Xcode 通配符?

发布于 2024-08-21 16:06:12 字数 223 浏览 4 评论 0原文

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

每行以:(

<select value="12345">

其中 12345 每行都不同)

开头,我想将其替换为:

@"

我该怎么做,我可以找到正确的查找和替换算法来执行此操作?这确实可以节省我的时间。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你的背包 2024-08-28 16:06:12

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

假设是前者,那么你可以编辑 ->在Project中查找,选择“正则表达式”,则查找字符串为:

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

替换字符串为:

<select value=@"\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">
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文