How to scrub SVGs ?

6 views
Skip to first unread message

omn...@gmail.com

unread,
Apr 25, 2026, 7:30:46 AMApr 25
to TextSoap
The aim is to get rid of all SVGs - these are - I suppose the emojs - I tried with
<text.*?>.*?</text> 
from AI, without success.

The svg has

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#EDECEC" d="M20.……… … … 4z8z"/></svg>

But 
<svg*?>.*?</svg>

wont do it either.

Any idea how?

/
best regards,
OmarKN

Screenshot 2026-04-25 at 13.10.43.jpg

Mark Munz

unread,
Apr 26, 2026, 9:19:30 AMApr 26
to text...@googlegroups.com
So the <svg.*?>.*?</svg> should work to grab tags that are svg. But emoji are considered actual text, so it won't capture them.
Instead, use \p{emoji} to match emoji characters, although it may have some difficulty with flags.
Match flags with \p{emoji}{2}. Still some limitations here, because two emoji next to each other would also match.

However, if you are just removing them, simply find \p{emoji} and replace with "" (nothing) and it should work in most cases.
I'd suggest getting rid of the emoji first, then going after the <svg> tags.



--
You received this message because you are subscribed to the Google Groups "TextSoap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to textsoap+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/textsoap/2db0fef1-1615-43ff-bc8d-8c504793ad8fn%40googlegroups.com.


--
Mark Munz
unmarked software
https://textsoap.com/

Reply all
Reply to author
Forward
0 new messages