in reply to Re: a regex to parse html tags
in thread a regex to parse html tags

Just one small addition to the problem of matching any character. The /s modifier is definitely the way to go, so that . matches everything including newlines.

If for some reason you don't want to use the \s modifier - maybe you have other dots in your regex which should not match newlines - you should use a character class. The advantage over (?:.|\n) is that no backtracking has to be done.

# character class matching any one character /[\000-\377]/ # or equivalent /[\d\D]/

-- Hofmator