Regular expression on Yahoo! pipes

孤人 提交于 2019-12-01 09:11:36

RegEx for the title:

(?i).*?<i>([^<]*).*               [ ] g  [x] s  [ ] m  [ ] i

RegEx for the link:

(?i).*?href="([^"]*).*            [ ] g  [x] s  [ ] m  [ ] i

Somehow the case-insensitive checkbox seems broken. Luckily you can substitute with (?i), which works nicely.

Here is a nice web2.0-ish tool to test regular expressions with: RegExr. But for some reason it's still beta. ;-)

One important thing to watch out for with YP is do not trust the debug screen, it has a small quirk of hiding some tags from view that can cause no end of confusion when attempting regexing. To expose any hidden html replace '<' with something like '#'

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!