Xcode通配符? [英] Xcode Wildcard characters?

查看:260
本文介绍了Xcode通配符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个完整的数据列表,我需要用它们替换一些数据.

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

每行均以:

<select value="12345">

(每行12345不同)

(where 12345 is different on each line)

,我想替换为:

@"

我该怎么做,我可以找到正确的查找和替换算法来做到这一点?这真的可以节省我几个小时.

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

推荐答案

您想在Xcode项目的源代码中进行此更改吗?或者您想使用Xcode编写程序来执行此操作?

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]+)">

,替换字符串为:

<select value=@"\1">

这篇关于Xcode通配符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆