RegexpQuery returns a Query for the given regexp.
(re *syntax.Regexp)
| 331 | |
| 332 | // RegexpQuery returns a Query for the given regexp. |
| 333 | func RegexpQuery(re *syntax.Regexp) *Query { |
| 334 | info := analyze(re) |
| 335 | info.simplify(true) |
| 336 | info.addExact() |
| 337 | return info.match |
| 338 | } |
| 339 | |
| 340 | // A regexpInfo summarizes the results of analyzing a regexp. |
| 341 | type regexpInfo struct { |