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...
-
【 MCO 更新】全马 6 个州属将实行 MCO 2.0 行动管制令为期两个星期:并更新 SOP 以及落实紧急状 态 王者 2021 年 1 月 12 日 全马 6 个州属将落实行动管制令 2.0 由于国内疫情持续严重,确证病例仍没后下降的迹象,首相丹斯里...
No comments:
Post a Comment