/\d/ # contains a digit
/^\D*$/ # doesn't contain a digit
/[abc]/ # contains either the letter a, b, or c
/^[^abc]*$/ # doesn't contain a, b, or c
/foo|bar/ # contains foo or bar
/???????/ # doesn't contain foo or bar
谁能帮我解决这个问题?我找不到任何解决方案,但我需要一个正则表达式来否定这个没有任何可编程逻辑。
最佳答案
关于regex - Perl 正则表达式/foo|bar/否定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10547518/