Bear with me, I am new to regular expressions, so my syntax may be slightly out.
Here is my expression:
"(?:\\s*[\"]?[']?\\s*)"
Which equates to: Any amount of white space, then the possibility of a double quote, then the possibility of a single quote, then any amount of white space.
The problem I have is that this still matches even if there is no double quote or single quote.
How do I make my expression so that there must be at least 1 double quote OR at least 1 single quote?
This should do the work:
@"(?:\s*('|\")+\s*)"
Try this expression:
(?:\\s*[\\"\\']\\s*)
:D
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