2 ms·
Yes, when you apply a technique incorrectly, it often doesn't work. "Tarzan"\s+and JillOfTheJungle|(Tarzan\s+and JillOfTheJungle) Seems to meet your needs?
by jameshart 11y ago
Yes, when you apply a technique incorrectly, it often doesn't work.
"Tarzan"\s+and JillOfTheJungle|(Tarzan\s+and JillOfTheJungle)
Seems to meet your needs?
- smegel 11y agoNo I dont want to capture anything, I just want to match a string that contains Tarzan but not "Tarzan". Your example seems to match both both. Is that too much to ask?
- jameshart 11y agoNo, it's not. Just run through the matches returned by this regex, and reject the ones which don't have a captured group. Done. Did you want a more complex solution?