I've done it a million times in the past but for whatever reason I keep screwing up how to properly write a backslash (\) in a regular expression. Sometimes i spent a little time to solve it but the problems is i simply forget it at next times. It is wasting times trying to figure out why the character class in this
[\";:()\\[\\]<>@.\\,]
regular expression wouldn't match strings containing commas. I'm blogging the solution so I'll have a permanent record and hopefully, I'll once and for all stop screwing it up!
Solution:
[\";:()\\[\\]<>@.\\\\,]
notes: character '/' is treat as normal string "/", and character '\' as character '\\'
Subscribe to:
Post Comments (Atom)
Man Utd's next generation of wonderkids
Manchester United have set off on their pre-season United States tour with a number of young stars involved, but some other talents have lef...

-
I forget to post this farewell photo for so around one week liao. Last wednesday 30th April 2008 is my f@rewell at Vida Sprint Sdn Bhd. So ...
-
My Team have won the best dressed Halloween competition for my company Halloween Annual Dinner last friday (2009-01-09). The winner prize is...
-
Oracle Java on Windows: C:\ProgramData\Oracle\Java\javapath I recently downloaded an early access release of JDK 9 ( build 68 ) fo...
No comments:
Post a Comment