Skip to content
Advertisement

Extract link attributes from string of HTML

What’s the best way to extract HTML out of $var?

example of $var

JavaScript

I want

JavaScript

example: preg_match();

what else?

Advertisement

Answer

Instead of crafting long complicated regex, do it in steps

JavaScript

one way of “non regex”, using explode

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement