Bhavesh Nayi Bhavesh Nayi - 9 months ago 49
HTML Question

iOS Use regular expression to remove/replace substring in HTML string

I would like to use regular expression to find given font-family and replace that font-family with mine font; in my string and remove that from so the return value is the original string without new font family applied on it.


<span style="font-family: TimesNewRoman; font-size: 12"><p>My text<br /><br />
<span style="font-family: 'Georgia','serif'; color: #1a1a1a;">Description is here</span> Detail description</strong></p>

Here I want to edit ‘Georgia’ with TimesNewRoman
Note: ‘
’ will be

Answer Source

Try this: