【发布时间】:2015-04-13 09:01:38
【问题描述】:
我有这个正则表达式:
[ ]\d+|(?<=[^-'(a-zA-Z0-9\n])\d+
匹配the 100,我想排除the 100匹配。
我尝试添加:(?!the 100),但没有成功!
有可能吗?
谢谢
编辑:
这是我需要的:
the 100 => the 100
_123 => _
(1234 => (
.12345 => .
?!8 => ?!
hi 123 => hi
?? 1234 => ??
(123-123) => (123-123)
aaa123 => aaa123
A1234 => A1234
Z_L12345 => Z_L12345
..A8 => ..A8
aaa a123 => aaa a123
【问题讨论】:
-
那你要匹配什么?
-
请提供您的初始字符串或您想要匹配和排除的任何内容