搜索多个字符串的正则表达式(Textpad)

编程入门 行业动态 更新时间:2024-10-24 04:51:39
本文介绍了搜索多个字符串的正则表达式(Textpad)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我对正则表达式有点陌生,希望搜索某些通配符字符串的多行/实例,例如 *8768、*9875、*2353.

I'm a bit new to regex and am looking to search for multiple lines/instaces of some wildcard strings such as *8768, *9875, *2353.

我想提取这些的所有实例(在一个文件中),而不是单独搜索它们.

I would like to pull all instances of these (within one file) rather than searching them individually.

非常感谢任何帮助.我尝试过诸如 *8768、*9875 之类的东西...

Any help is greatly appreciated. I've tried things such as *8768,*9875 etc...

推荐答案

如果我明白你在问什么,它是一个像这样的正则表达式:

If I understand what you are asking, it is a regular expression like this:

^(8768|9875|2353)

这仅匹配行首的三组数字字符串.

This matches the three sets of digit strings at beginning of line only.

更多推荐

搜索多个字符串的正则表达式(Textpad)

本文发布于:2023-10-23 13:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1520998.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   字符串   正则表达式   Textpad

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!