Questions tagged «regex-lookarounds»

5
正则表达式在grep中预示``不跟随''
我正在尝试对所有Ui\.不跟随Line字母甚至字母的情况进行grepL 编写正则表达式以查找特定字符串的所有实例(而不是其他字符串)的正确方法是什么? 提前使用 grep "Ui\.(?!L)" * bash: !L: event not found grep "Ui\.(?!(Line))" * nothing

3
正则表达式,但不包括
对于正则表达式,直到但不包括搜索的语法是什么?有点像: Haystack: The quick red fox jumped over the lazy brown dog Expression: .*?quick -> and then everything until it hits the letter "z" but do not include z

6
正则表达式在匹配字符串后获取单词
以下是内容: Subject: Security ID: S-1-5-21-3368353891-1012177287-890106238-22451 Account Name: ChamaraKer Account Domain: JIC Logon ID: 0x1fffb Object: Object Server: Security Object Type: File Object Name: D:\ApacheTomcat\apache-tomcat-6.0.36\logs\localhost.2013-07-01.log Handle ID: 0x11dc 我需要捕获该行中单词之后的Object Name:单词。哪个是D:\ApacheTomcat\apache-tomcat-6.0.36\logs\localhost.2013-07-01.log。 我怎样才能做到这一点? ^.*\bObject Name\b.*$ 匹配-对象名称
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.