c# - Regex find at least one of two characters -


bear me, new regular expressions, syntax may out.

here expression:

"(?:\\s*[\"]?[']?\\s*)" 

which equates to: amount of white space, possibility of double quote, possibility of single quote, amount of white space.

the problem have still matches if there no double quote or single quote.

how make expression there must @ least 1 double quote or @ least 1 single quote?

this should work:

@"(?:\s*('|\")+\s*)" 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -