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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -