James Edward G. II wrote:
It just replaces the 1st occurance.
Hope that helps.
James Edward G. II
It’s also worth pointing out that [\s\S] means a character class
containing all whitespace and non whitespace characters–in other words:
everything. This is equivalent:
"as sd “.sub(/<.?>| /,"”)
which replaces [\s\S] with .
Also, if your tags could have line breaks in them, you can add ‘m’ (for
multiline) to the end of the regular expression literal and then . will
match newlines as well:
Oh, and if you replace that last space (after the pipe character) with
\s, then it will match tabs too (or any whitespace for that matter).