Hi, How I change "<ref>*</ref>" to ""??
Topic on Extension talk:Replace Text
I see you're looking for the regex that matches any text inside <ref> tags, which also includes both the opening and closing tags.
It's /<ref>[\s\S]*?<\/ref>/
(without the leading or trailing slashes):
\/
is intepreted as a literal/
[\s\S]*
is intepreted as at least 0 characters, including newlines.?
makes the*
quantifier lazy (so it matches as least characters as possible).
Thansk, but it is not working. <ref>*</ref> I have more in article. This sequense delete text in first <ref> and last </ref>
That's what the ?
modifier to make the *
quantifier ungreedy is for. Remove the question mark just in case, I think this uses PCRE's U
flag, which makes quantifiers ungreedy by default.
Hi, I correct code. It is Ok. It is making, what I want. Thanks for help.