I have a Regex that is almost what I need. I am sure this is a repeat of a repeat however I can't find the answer I am looking for.
Regex I need is an expression that will match a parenthesis that is not followed by a space, however I only want it to match the parenthesis.
(\([^\s])
This will match all parenthesis that are not followed by a space, however it matches the character that is directly after the parenthesis as well. How do I only get a match for the parenthesis?
Use zero width assertion lookahead
\((?=\S)
or
\((?=[^\s])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With