Php regexp,如何查找不带';不包含某个字符?
我有一组字符:Php regexp,如何查找不带';不包含某个字符?,php,regex,Php,Regex,我有一组字符: peach_addict 612 EmailName 747 littefooted@aol 805-582-73 748 cell is pager number 762 (805) Parents Home
peach_addict 612
EmailName 747
littefooted@aol 805-582-73 748
cell is pager number 762
(805) Parents Home 765
Star 82 777
Moms cell 1198
MOM LISA 1223
LUVMARTIA82OL@AOL. 1342
ISABLGUTIRREZ@BAMMDELS 1349
我想选择不包含@
符号的每一行
如果我这样做,++.
我将得到以下几行:
littefooted@aol 805-582-73 748
LUVMARTIA82OL@AOL. 1342
ISABLGUTIRREZ@BAMMDELS 1349
但是我想要其他的。我知道我可以使用^
符号,但这不起作用:[^(+@.+)]
有什么想法吗
谢谢正确的语法是
^[^@]*$
这意味着:
^ - beginning of line
[ - start of character class
^ - any character except the following
] - end of character class
* - 0 or more
$ - end of line
我在正则表达式教程中取得了很好的效果。正确的语法是
^[^@]*$
这意味着:
^ - beginning of line
[ - start of character class
^ - any character except the following
] - end of character class
* - 0 or more
$ - end of line
我在正则表达式教程中取得了很好的效果。@Patrioticcow,你必须有多行标志,在我将其与句点放在同一行之前,这有点让人困惑。@Patrioticcow,你必须有多行标志,在我将其与句点放在同一行之前,这有点让人困惑。