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...).
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!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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...).
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!