搜索多个字符串的正则表达式(Textpad) [英] Regular expression to search multiple strings (Textpad)

查看:47
本文介绍了搜索多个字符串的正则表达式(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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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