Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this regex seems to match almost any character. I am particularly curious about the 'x' in the regex.
Posted
Updated 12-Sep-13 2:01am
v2

 
Share this answer
 
Comments
CHill60 12-Sep-13 8:20am    
Apologies for the overlap and my 5 - excellent links
Maciej Los 12-Sep-13 8:21am    
Thank you ;)
The hyphen is the key part, the regex is saying match any character in the range "+" to "x" or *

For example ")" and "z" would not match

Not sure why it isn't just [\*-x] to be honest.
 
Share this answer
 
Comments
Maciej Los 12-Sep-13 8:22am    
Good explanation!
rohith naik 12-Sep-13 8:33am    
can you tell me what characters come in this range ?? + to x ??
CHill60 12-Sep-13 16:06pm    
Sorry for the delay! Have a look at this link for the characters http://www.asciitable.com/[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900