I have seen this question on SO before, but it was specific to a tag or attribute
I need to match any attribute values with a regex. I have the following, which matches both the attribute and value:
I made a slight mod to your regex string.
I replaced the
I think your regex implementation should be able to do a positive lookbehind.
This regex will show inconsistency when presented with quotes/doublequotes nested inside themselves like this:
You may want to look into changing your character classes to get around that.
Here's the full regex string:
As per our online chat discussion, I came up with a new regex which is shorter and much cleaner:
What this regex does is as follows:
>somewhere ahead of our match -