GONMarkupParser icon indicating copy to clipboard operation
GONMarkupParser copied to clipboard

extract attributes RegExp question

Open jiyee opened this issue 8 years ago • 1 comments

Another question about extract attributes regexp in code below:

([^\\s=]+)\\s*=\\s*('(\\\\'|[^']*')|\"(\\\\\"|[^\"])*\")

why not is below:

([^\\s=]+)\\s*=\\s*('(\\\\'|[^'])*'|\"(\\\\\"|[^\"])*\")

jiyee avatar Oct 21 '16 09:10 jiyee

Hi, in fact, I didn't write it, but found it on the web, so i did assume it was correct after testing it on numerous expressions. Did you find a case were my regex fail to extract attributes ? Regards

nicolasgoutaland avatar Oct 21 '16 10:10 nicolasgoutaland