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...
-
My Team have won the best dressed Halloween competition for my company Halloween Annual Dinner last friday (2009-01-09). The winner prize is...
-
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...
-
好 热的夜晚,没有一丝的风 又多蚊虫 不敢开窗换气 让人厌烦, 又是一个 难眠 的 夜晚 当结束一整天繁忙的工作时, 在静夜 惊醒时, 枕边已潮湿一片
No comments:
Post a Comment