Regex: Find groups of lowercase letters between HTML tag

一个人想着一个人 提交于 2019-12-04 14:22:44
CSᵠ

Perfect usecase for: Collapse and Capture a Repeating Pattern in a Single Regex Expression

Modified it for your case:

(<span class="SC">(?:(?!<\/span>)(?:[^a-z&]|&[^;]+;))*|(?!^)\G(?:(?!<\/span>)(?:[^a-z&]|&[^;]+;))*)([a-z]+)

Replace with: \1<span class="FSC">\U\2\E</span>

And here's the RegEx explained: http://regex101.com/r/jU6bA5

This is a solution for "Replace All" as it works via RegEx global modifier /g !

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