Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't do this ((data-id)="|src=") ? #46

Open
syrm opened this issue Mar 14, 2017 · 2 comments
Open

Can't do this ((data-id)="|src=") ? #46

syrm opened this issue Mar 14, 2017 · 2 comments
Labels

Comments

@syrm
Copy link

syrm commented Mar 14, 2017

I am wrong or i can't do this regex : ((data-id)="|src=")
I tried lots of thing, my last attempt is this one :

capture ( any of ( ( capture(literally 'data-id'), literally '="' ), (literally 'src="') ) )

The SRL Query contains an error: Non-matching parenthesis found.

@KarimGeiger
Copy link
Member

Hi,

thanks for your comment. Yes, it seems like this indeed doesn't work, as it will treat any of the statements in the "any of" group equally and gets confused by the parenthesis around the inner two conditions.

The closest I can get is

capture (
  any of (
    capture(literally 'data-id'), literally '="',
    literally 'src="'
  )
)

which of course isn't right. Maybe working with quantifiers helps to find a way around, but this shouldn't be the case. I'll have a look at it.

@syrm
Copy link
Author

syrm commented Mar 14, 2017

I tried to find a solution with quantifier, but can't found a solution either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants