Intersection of regexes.
(*args: ReRef)
| 2412 | |
| 2413 | |
| 2414 | def Intersect(*args: ReRef) -> ReRef: |
| 2415 | """Intersection of regexes.""" |
| 2416 | if len(args) < 2: |
| 2417 | raise TypeError("Intersect requires at least 2 arguments") |
| 2418 | result = args[0] |
| 2419 | for a in args[1:]: |
| 2420 | result = ReRef(ReIntersectNode(result._ast, a._ast), _merge(result._vars, a._vars)) |
| 2421 | return result |
| 2422 | |
| 2423 | |
| 2424 | def Complement(re: ReRef) -> ReRef: |