I'm trying to match all parenthesis or quotes AND/OR the pattern ##.*##
(so I can remove them all in 1 call). I thought [\(\)\"]* | ##.*##
would do the trick. RegExp tester says
[\(\)\"]* | ##.*##
/
gm
1st Alternative [\(\)\"]*
Match a single character present in the list below [\(\)\"]*
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
\( matches the character ( literally (case sensitive)
\) matches the character ) literally (case sensitive)
\" matches the character " literally (case sensitive)
matches the character literally (case sensitive)
2nd Alternative ##.*##
## matches the characters ## literally (case sensitive)
.* matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
## matches the characters ## literally (case sensitive)
which also looks like it should work, but given strings like
(
()
""
##VAL##
- `" ##XXX## ) "
NOTHING matches. Each of the patterns on their own match the corresponding strings, but when I put them together, not so much. I'm guessing it's got to be my |
operator, but that's where I get in a little over my head.
Can anyone shed some light for me? Thx!!