I am currently working on an HTML utility. I want to extract the font-family used in the HTML Code using Javascript. I found this piece of Regular Expression which can find only the normal fonts:
font-family\s*?:.*?(;|(?=""|'|;))
i.e font-family:Arial, Helvetica, sans-serif
I am not able to match font families like:
font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
Are there any methods available to extract the fonts/font families?
Finally I got it sorted out..
}
}