Regular expression to search multiple strings (Textpad)

gfuller40 picture gfuller40 · Jan 8, 2014 · Viewed 184.8k times · Source

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.

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

Answer

wallyk picture wallyk · Jan 8, 2014

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.