We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Extract text between asteriks

I want to extract text between two asterisks from my doc file.

Example: in doc file there is a text like

"* Hello World *"

I want to get “Hello World” as output.
Please Help me

Hi there,

Thanks for your inquiry. In your case, I suggest you following solution.

1) Implement IReplacingCallback interface to find the ** and replace it with bookmarks e.g. first bookmark name is Bookmark1 and second is Bookmark2. Please read this documentation link.
2) Extract the contents between bookmark Start and End nodes using the code example shared here.

Please read about extracting contents from here:

If you still face problem, please share your input Word document here for testing purposes.