[Gambas-user] Regexp pattern in string question
Ron
ron at ...1740...
Wed Jun 17 15:31:47 CEST 2009
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.
More information about the User
mailing list