Skip to content

Fix regex word boundary logic to include underline - #11099

Merged
rapids-bot[bot] merged 8 commits into
NVIDIA:branch-22.08from
davidwendt:bug-word-boundary-underline
Jun 28, 2022
Merged

Fix regex word boundary logic to include underline#11099
rapids-bot[bot] merged 8 commits into
NVIDIA:branch-22.08from
davidwendt:bug-word-boundary-underline

Conversation

@davidwendt

@davidwendt davidwendt commented Jun 13, 2022

Copy link
Copy Markdown
Contributor

Closes #11062

The regex logic handling word boundary (identified by \b and \B) did not include the _ underline character as defined for word characters by https://www.regular-expressions.info/shorthand.html. This PR fixes this by using the logic for identifying word characters from the CCLASS_W specifier (identified by \w).
Also, the word-boundary test cases are updated to include tests with the _ character as well as tests with \B.

@davidwendt davidwendt added bug Something isn't working 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. strings strings issues (C++ and Python) non-breaking Non-breaking change labels Jun 13, 2022
@davidwendt davidwendt self-assigned this Jun 13, 2022
@codecov

codecov Bot commented Jun 15, 2022

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (branch-22.08@e0003a0). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff               @@
##             branch-22.08   #11099   +/-   ##
===============================================
  Coverage                ?   86.32%           
===============================================
  Files                   ?      144           
  Lines                   ?    22751           
  Branches                ?        0           
===============================================
  Hits                    ?    19640           
  Misses                  ?     3111           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0003a0...25952ee. Read the comment docs.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Jun 21, 2022
@davidwendt
davidwendt marked this pull request as ready for review June 21, 2022 20:45
@davidwendt
davidwendt requested a review from a team as a code owner June 21, 2022 20:45

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The well-written PR description made this review easy. Thanks!

@davidwendt

Copy link
Copy Markdown
Contributor Author

@gpucibot merge

@rapids-bot
rapids-bot Bot merged commit 490dcd7 into NVIDIA:branch-22.08 Jun 28, 2022
@davidwendt
davidwendt deleted the bug-word-boundary-underline branch June 28, 2022 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change strings strings issues (C++ and Python)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] regexp: word boundaries \b and \B inconsistent with Java/Python around _

4 participants