Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: ReplaceText is replacing letters from a word #392

Closed
AbuRuqaa opened this issue Dec 23, 2020 · 1 comment
Closed

Bug: ReplaceText is replacing letters from a word #392

AbuRuqaa opened this issue Dec 23, 2020 · 1 comment

Comments

@AbuRuqaa
Copy link

AbuRuqaa commented Dec 23, 2020

I will give you an example:
if I want to replace the word care exactly and there's another word "carefully" the program will replace the word care from carefully, I tried adding a space to the word I want to replace but this won't change the words that is followed by a dot.

doc.ReplaceText(searchValue: replaced_word , newValue: new_word, false, RegexOptions.IgnoreCase);

edit: pls if u answered my question provide a code sample I have been struggling with this for a while now.

@geekworm
Copy link

geekworm commented Jan 4, 2021

Try it
doc.ReplaceText("care", "abc", false, RegexOptions.None | RegexOptions.Multiline, null, null, MatchFormattingOptions.ExactMatch, false, false, false);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants