Skip to content

Smarter regex modifiers#520

Merged
dmdashenkov merged 10 commits intomasterfrom
smarter-regex-flags
Mar 26, 2020
Merged

Smarter regex modifiers#520
dmdashenkov merged 10 commits intomasterfrom
smarter-regex-flags

Conversation

@dmdashenkov
Copy link
Contributor

@dmdashenkov dmdashenkov commented Mar 25, 2020

In this PR we deprecate the PatternOpntion.flags field, which is an integer mask, in favour of the modifiers — a new field which allows specifying regular expression modifiers in a descriptive manner.

Fixes this issue.

@dmdashenkov dmdashenkov self-assigned this Mar 25, 2020
@codecov
Copy link

codecov bot commented Mar 25, 2020

Codecov Report

Merging #520 into master will increase coverage by 0.01%.
The diff coverage is 80.55%.

@@             Coverage Diff              @@
##             master     #520      +/-   ##
============================================
+ Coverage     73.89%   73.90%   +0.01%     
- Complexity     2901     2912      +11     
============================================
  Files           500      500              
  Lines         11717    11747      +30     
  Branches        651      658       +7     
============================================
+ Hits           8658     8682      +24     
- Misses         2835     2841       +6     
  Partials        224      224              

@dmdashenkov dmdashenkov marked this pull request as ready for review March 25, 2020 10:59
@dmdashenkov dmdashenkov requested a review from armiol March 25, 2020 10:59
@dmdashenkov
Copy link
Contributor Author

@armiol, PTAL.

Copy link
Collaborator

@armiol armiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmdashenkov LGTM with a new comment.

import static java.util.regex.Pattern.UNICODE_CHARACTER_CLASS;

/**
* A constraint, which when applied to a string field, checks whether that field matches the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document the public API methods, for the sake of uniformity.

@dmdashenkov dmdashenkov merged commit 38fc4e6 into master Mar 26, 2020
@dmdashenkov dmdashenkov deleted the smarter-regex-flags branch March 26, 2020 12:26
@dmitrykuzmin dmitrykuzmin mentioned this pull request Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need better documentation for PatternOption.flag

2 participants