summaryrefslogtreecommitdiffstats
path: root/grep-regex/src/word.rs
diff options
context:
space:
mode:
Diffstat (limited to 'grep-regex/src/word.rs')
-rw-r--r--grep-regex/src/word.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/grep-regex/src/word.rs b/grep-regex/src/word.rs
index be740020..86291f20 100644
--- a/grep-regex/src/word.rs
+++ b/grep-regex/src/word.rs
@@ -55,6 +55,11 @@ impl WordMatcher {
}
Ok(WordMatcher { regex, names, locs })
}
+
+ /// Return the underlying regex used by this matcher.
+ pub fn regex(&self) -> &Regex {
+ &self.regex
+ }
}
impl Matcher for WordMatcher {