我正在尝试编写一个 select
语句,该语句将在 www.google.com/blahblahblah
上运行,但不会在 www.google.com/readerblahblahblah
请帮忙。我什至不知道从哪里开始。
最佳答案
如果你想从字面上匹配“blahblahblah”,你可以这样做:
select when pageview "www\.google\.com/blahblahblah"
这不会匹配“readerblahblahblah”。但是,如果您想要匹配 google.com 上除“/reader”之外的所有内容,则需要如下内容:
select when pageview "www\.google\.com/(?!reader)(.*)" setting (matched)
请参阅answer here了解更多详情。
关于regex - 在KRL中如何制定这个select语句?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5797984/