w****w 发帖数: 521 | 1 I want to get all strings between aaa and zzz that don't have bbb or ccc in
them. for example, "dafaaahfgfzzzghdfgaaafgsbbbdszzzpaaagsdzzzzz",the
results should be "hfgf" and "gsdzz". |
w****w 发帖数: 521 | 2 No easy solution? Looks like I have to do a second match to filter out those
I don't want. |
e*******o 发帖数: 4654 | 3 qr/aaa((?:.(?!(?:bbb|ccc)))+)zzz/
negative look ahead |
w****w 发帖数: 521 | 4 That's exactly what I want. Thanks!
【在 e*******o 的大作中提到】 : qr/aaa((?:.(?!(?:bbb|ccc)))+)zzz/ : negative look ahead
|