DEV Community

Discussion on: Regular Expressions And Template Literals

Collapse
 
srobfr profile image
srobfr

Nice trick.
PHP has a dedicated modifier for this kind of regex usage. See php.net/manual/en/reference.pcre.p...

Just a remark though : trying to parse HTML tags using regex is a bad idea (mandatory reading : stackoverflow.com/questions/173234...).

Collapse
 
rfornal profile image
bob.ts

I know the idea is bad; as I said, this is a code example (simply research) and I needed something to work with).

Thanks for the comments!