Sublime text regex find and replace

只愿长相守 提交于 2020-01-12 05:36:08

问题


In sublime text, I need to replace all instances of:

rs('???????')

with

$rs['??????']

(keeping the ??????? part the same). I'm a regex virgin and I've only got as far as locating the regex button on the find and replace panel.

How is this possible.


回答1:


Find regex:

rs\('(.*?)'\)

Replace:

$rs['$1']

Beware that this will expect anything inside the quotes; if it isn't what you need, please tell me :)



来源:https://stackoverflow.com/questions/17617961/sublime-text-regex-find-and-replace

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