Skip to content

Instantly share code, notes, and snippets.

@reyaz
Last active February 9, 2016 00:28
Show Gist options
  • Save reyaz/5aba200a93412d5fa995 to your computer and use it in GitHub Desktop.
Save reyaz/5aba200a93412d5fa995 to your computer and use it in GitHub Desktop.
attr=['"]?\s*(?:\w+\s+)*\b(string)\b(?:\s+\w+)*\s*['"]?
@reyaz
Copy link
Author

reyaz commented Feb 9, 2016

tested against

alt="foo bar baz" class="foo bar baz" title="foo bar baz"
class="foo"
class="foo bar"
class="foo bar baz"
class="foo barbaz"
class="foobar"
class="foobar baz"
class="foobarbaz"
class="bar"
class="bar baz"
class="barbaz"
class=" bar "

alt='foo bar baz' class='foo bar baz' title='foo bar baz'
class='foo'
class='foo bar'
class='foo bar baz'
class='foo barbaz'
class='foobar'
class='foobar baz'
class='foobarbaz'
class='bar'
class='bar baz'
class='barbaz'
class=' bar '

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment