How to get the startIndex and endIndex of match results?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading the public API around the test and testExact methods, then inspect how Java regular-expression match results expose iteration, indexes, and groups. Determine whether the requested details fit the existing API; done would include a documented way to access them and tests covering multiple matches and group information.
Written by the indexing model from the issue text.
Description
I have to find all occurrences of dates in an email: each occurrence and the startIndex and endIndex of the occurrence. I would like to use a human-readable regex builder like JavaVerbalExpressions, but looking at the API I see no way to extract the match details like startIndex and endIndex, I only see test and testExact returning a boolean.
Is it possible to loop over all matches and get the start and end indexes and all match details (group names etc)? Thanks!
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 243
- Avg merge
- 26m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from VerbalExpressions/JavaVerbalExpressions
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
VerbalExpressions/JavaVerbalExpressions#76 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
VerbalExpressions/JavaVerbalExpressions#66 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
VerbalExpressions/JavaVerbalExpressions#63 · 1 comment ·
-
or for no string Open
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
VerbalExpressions/JavaVerbalExpressions#59 · 8 comments ·
All issues in VerbalExpressions/JavaVerbalExpressions
Similar issues
-
Bug Java Platform: Java
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-java#6138 · 1 comment ·
-
bug needs triage p2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100