Reputation: 35
If I have the following data:
"test1"."test2" AND "test1"."test2"
What regex can I use to match "test1"."test2"
?
I tried the following but it did not work.
\b"test1"."test2"(\s+|$)
In the given example I'd like to match "test1"."test2"
, and, "test1"."test2"
Upvotes: 0
Views: 343
Reputation: 336478
\b
matches at a word boundary, i. e. just before or after an alphanumeric character. Since "
is not alphanumeric (and assuming that there is no word character right before it), the assertion fails - and therefore the entire regex.
Drop the \b
, escape the dot, and you're set.
Upvotes: 1