Python REGEX ignore case at the beginning of the sentence and take the rest -
i have kind of results:
ª!è[008:58:049]http_cli:0 - line written in... and want ignore beginning characters ª!è , only: http_cli:0 - line written in... in simple regex line.
i tried this: ^[\w0-9]* taking extended ascii characters plus time , not ignoring it, doing opposite...
any help?
thanks!
if want after closing square bracket, no matter what, , skip before can go match this:
s = "ª!è[008:58:049]http_cli:0 - line written in..." m = re.match(r'^.*?]([\s\s]*)', s) print(m.group(1)) print's 'http_cli:0 - line written in...'
this expression looks through arbitrary number of characters before closing bracket , matches after that. matched group available m.group(1)
Comments
Post a Comment