|
|
Browse by Tags
All Tags » HTML » font
-
Hello,
I'm looking for a pattern that extracts the attributes inside an html element string
I came up with the following:
/<font\s[^>]*face="(.*?)" size="(.*?)" color="(.*?)"[^>]*>(.*?)<\/font>/si
but what if not all 3 attributes face, font and size are required?
is it possible to ...
-
I want to change a font element to an XHTML compatible variant.
e.g.
find
<font face="arial" size="1"
color="red" >hello world</font>
replace
<span
style='font-family: arial; font-size: 1; color: red;'>hello
world</span>
note:
- the font attributes can change order
- ...
|
|
|