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

Replace a single word but not when it's a part of a sentence #126

Open
mxdslien opened this issue Aug 29, 2022 · 2 comments
Open

Replace a single word but not when it's a part of a sentence #126

mxdslien opened this issue Aug 29, 2022 · 2 comments

Comments

@mxdslien
Copy link

I'm translating a bunch of text and I have a handful of places saying "Yes" and "No". I want to replace all instances where it only says "No", but avoid replacing "No"'s from other instances where it is a part of a longer sentence.

E.g:
Want to translate: No -> Nei
Want to avoid: This is no longer available -> This is nei longer available

Is this possible?
I tried the "Whole word" option but I might be misunderstanding what that option does.

@thierryc
Copy link
Owner

Certainly! You can achieve this by utilizing the regex options.
It might seem a bit tricky initially, but you can likely figure it out.

Give the https://regex101.com/ a try for testing and refining your regular expression.

@thierryc
Copy link
Owner

Another good link for regex lovers:
https://www.debuggex.com

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

2 participants