> Hi, has anyone dealed with regexp patterns, how to define this regexp > pattern in a string? > > ^(/\S+) - - /\[(/\d+)/\w+/\d{4}:(/\d+):/\d+:/\d+ [/\d+-]+/\]!]" > > So for example : > > DIM sPattern as String = "^(/\S+) - - > /\[(/\d+)/\w+/\d{4}:(/\d+):/\d+:/\d+ [/\d+-]+/\]!]" > > RegExpFind (sPattern, "text to search") > > IDE reports "Bad Character Constant in string..." as error, it's not > happy with all those / and \ chars I guess. > > They are difficult enough already if I have to exacpe them ones more, > i'm lost ;-) > > I'm trying to parse apache log with it (getting client ip adress/time/date) > Maybe Scan() is a better option, anyone dealed with this dilemma? > > Regards, > Ron_2nd. >
"\" must be doubled. -- Benoît ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user