in reply to Matching n characters with m//g
One minor point that I have not seen mentioned (or maybe I was just inattentive) is the fact that if you want '.' to truly match any character you need to specify the /s modifier on the regular expression. Without this, it will not match a newline.
|
|---|