#!/usr/bin/perl use strict; use warnings; for (<DATA>) { chomp; print "Match: $_\n" if /^(?=.*name=bob)(?!.*flags=.*?cat.*?;)/; } __DATA__ name=bob;flags=human;age=10 name=tiddles;flags=cat,black;age=3 name=bob;flags=cat,white;age=6
In reply to Re: Multiple regexs into single combined regex using lookaheads
by tybalt89
in thread Multiple regexs into single combined regex using lookaheads
by mxb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |