Replacing digits immediately after a saved pattern

守給你的承諾、 提交于 2019-12-02 04:29:47

As it turns out, the PCRE-style back-references do not work.

So, you have to use \015 to replace with the text captured with the first capturing group (\01) and 5.

Since there cannot be more than 99 capturing groups, and both the digits after \ are treated as back-reference group number, \01 is interpreted as the reference to the first group, and the rest are literal digits.

The replacement term \15 is being interpreted as "group 15" - you must escape the "5":

Try replacing with \1\\5, or if that doesn't work (I don't have textwrangler handy) use a look behind:

Search: (?<=text)9
Replace: 5

The look behind doesn't consume input, so only the "9" is matched.

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