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

PatternTemplate.pattern() could accept some modifiers #140

Closed
danon opened this issue Jun 24, 2022 · 1 comment
Closed

PatternTemplate.pattern() could accept some modifiers #140

danon opened this issue Jun 24, 2022 · 1 comment
Labels
feature Adds new functionality

Comments

@danon
Copy link
Member

danon commented Jun 24, 2022

That way, we could build regular expressions with in-pattern flags.

Pattern::template("return @();")->pattern('strlen', 'i');

That would match

return strlen();
return strLen();
return STRLEN();

but not

RETURN strlen();

because return is being matched by the case-sensitive pattern.

@danon danon added the feature Adds new functionality label Jun 24, 2022
@danon
Copy link
Member Author

danon commented Aug 11, 2022

It should probably only add them if they differ, and it should ignore order.

@danon danon changed the title PatternTemplate.pattern() could accept flags PatternTemplate.pattern() could accept modifiers Oct 24, 2022
@danon danon changed the title PatternTemplate.pattern() could accept modifiers PatternTemplate.pattern() could accept some modifiers Dec 1, 2022
@danon danon closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds new functionality
Projects
None yet
Development

No branches or pull requests

1 participant