diff --git a/web/regexp_pattern.go b/web/regexp_pattern.go index f9f8ecc..95e7e09 100644 --- a/web/regexp_pattern.go +++ b/web/regexp_pattern.go @@ -48,6 +48,10 @@ func (p regexpPattern) String() string { return fmt.Sprintf("regexpPattern(%v)", p.re) } +func (p regexpPattern) Raw() *regexp.Regexp { + return p.re +} + /* I'm sorry, dear reader. I really am. diff --git a/web/string_pattern.go b/web/string_pattern.go index 9e9945a..aa9b33a 100644 --- a/web/string_pattern.go +++ b/web/string_pattern.go @@ -90,6 +90,10 @@ func (s stringPattern) String() string { return fmt.Sprintf("stringPattern(%q)", s.raw) } +func (s stringPattern) Raw() string { + return s.raw +} + // "Break characters" are characters that can end patterns. They are not allowed // to appear in pattern names. "/" was chosen because it is the standard path // separator, and "." was chosen because it often delimits file extensions. ";"