Returns the pattern string of the regex.
(&self)
| 103 | |
| 104 | /// Returns the pattern string of the regex. |
| 105 | pub fn pattern(&self) -> &str { |
| 106 | // `as_str` returns the raw pattern as provided during construction, |
| 107 | // and doesn't include any of the flags. |
| 108 | self.regex.as_str() |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | /// Error type for regex compilation failures. |