Copy link to clipboard
Copied
I'm trying to find something that matches a lookbehind of spaces or opening brackets but can't make it work. I want to be able to find a b c when preceeded by a space or opening bracket, but not capturing the space or bracket.
I want it to be the following but it seems classes don't work in positive lookbehind:
(?<=[ \(])[acb]
Looks simple enough but much googling is yielding nothing, I'm probably seartching for the wrong terms.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks so much! I meant opening parentheses (I don't know if it's the same where you are but in the UK brackets is often used to mean parenthese) but your answer contained the solution in terms of using the pipe character.
Copy link to clipboard
Copied
Hi @MrZZY:
The pipe character means "or" so for example, look for a leading space before "abc" or look for the open bracket/parenthesis before "abc".
And in the US, these are parentheses ( ) and these are brackets [ ], so we both learned something. 😊
~Barb