I’m trying to use Aspose to get the text in a .doc file that is contained between two tags, like for instance
Foi what i’ve seen i think i need to use regular expressions, but i can’t seem to understand how exactly am i suppose to use them or even if i should.
Can someone please give me a hint on how to accomplish this?
Thanks for your request. To extract content from document you can use DocumentVisitor class. Please read this How-to from our documentation.
After you get document content you can use Regex to get all text content between .
Regex exp = new Regex(@"(?<=).+?(?=)", RegexOptions.IgnoreCase);
MatchCollection MatchList = exp.Matches(allDocumentContent);
foreach(Match content in MatchList)
{
Console.WriteLine(content.Value + "\n");
}
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.