Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/ru/lanwen/verbalregex/VerbalExpression.java
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,17 @@ public List<String> getTextGroups(final String toTest, final int group) {
return groups;
}

/**
* Provides access to the underlying regex {@link Pattern}. This can be useful
* for interacting with other parts of the ecosystem or for doing more fine
* grain matching than supported by the methods on this class.
*
* @return The regex pattern which the {@link VerbalExpression} represents.
*/
public Pattern pattern() {
return this.pattern;
}

@Override
public String toString() {
return pattern.pattern();
Expand Down