由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - regex probelm
相关主题
问个java regex基本问题计算围棋棋盘合法图案的源代码
Re: 问个google面试题 (转载)re一问
多文本搜索多个字符串请教一个变态的regular expression 替换
Python: how to match the price string starting with $ ?any way to use regex in Fortran?
Pattern matching匹配问题 (转载)
[合集] c++的题装完boost之后还要再装REGEX吗?
数据类型判断RegEx puzzle
java string stream[合集] regular expression for whitespace in path
相关话题的讨论汇总
话题: probelm话题: regex话题: zzz话题: gsdzz话题: hfgf
进入Programming版参与讨论
1 (共1页)
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

1 (共1页)
进入Programming版参与讨论
相关主题
[合集] regular expression for whitespace in pathPattern matching
Can someone help me a quick regex?[合集] c++的题
要不要学习 scripting languages such as Python?数据类型判断
from beautiful codejava string stream
问个java regex基本问题计算围棋棋盘合法图案的源代码
Re: 问个google面试题 (转载)re一问
多文本搜索多个字符串请教一个变态的regular expression 替换
Python: how to match the price string starting with $ ?any way to use regex in Fortran?
相关话题的讨论汇总
话题: probelm话题: regex话题: zzz话题: gsdzz话题: hfgf