Lurker News

Comments (129) 40 threads

Show all comments

Showing thread 11 of 40

adambowles1 reply#
>/h.llo/ the '.' matches any one character other than a new line character... matches 'hello', 'hallo' but not 'h llo'

in the cheatsheet is false. (https://regexr.com/4tc48)
`.` can match any character except linebreaks (including whitespace)

jodrellblank#
`.` "can" match any character including linebreaks if the regex engine is in re.DOTALL mode (Python) or SingleLine Mode (.Net).