Xcode Wildcard characters?

回眸只為那壹抹淺笑 提交于 2019-12-08 06:52:57

问题


I have a whole list of data that I need to replace some data with.

Each line starts with:

<select value="12345">

(where 12345 is different on each line)

and I want to replace it with:

@"

How do I do this, I can find the right find and replace algorithm to do this? It would really save me hours.


回答1:


You want to do this change in your source code in an Xcode project ? Or you want to write a program using Xcode to do this ?

Assuming it's the former then you can just do Edit -> Find in Project, select "Regular Expression", then the find string would be:

<select value="([0-9]+)">

and the replacement string would be:

<select value=@"\1">


来源:https://stackoverflow.com/questions/2272072/xcode-wildcard-characters

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