I am looking for a regex to find as well "right" and "all right" in a text.
I tried:
\ball\W+\w+ight\b
This only gives as a result "all right", not both "right" and "all right".
Same problem to find both it and its, it's and it is.
I am looking for a regex to find as well "right" and "all right" in a text.
I tried:
\ball\W+\w+ight\b
This only gives as a result "all right", not both "right" and "all right".
Same problem to find both it and its, it's and it is.
Maya Davis
On
Try this \ball\W+\w+ight\b|\w+ight\b This is a good tool for working with some cases of regex http://rubular.com/
Copyright © 2021 Jogjafile Inc.
This should work:
This matches
rightand an optional(?)all+ whitespace(\s) in front of it, if present.The
\banchors are there to make sure that there is a word boundary beforeallorrightand afterright.Additionally the
?:is here to not capture theall\sgroup.Example
EDIT
it is / it's:
it / its