Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Search a Multiple Entry RegEx

Avatar of jadunham1
jadunham1 asked on
.NET ProgrammingC#Editors IDEs
4 Comments1 Solution276 ViewsLast Modified:
Basically I have done this in Java and am just wondering how to do this in C#.
I want to search through a String made out of expressions to see if my entry matches any of them.

In Java I did a string with the regex's then made a Pattern to compile the multiple regex's in the string and then a Matcher to match them.

So for example in java

final String REGEX_LIST = "2\\d{4}|
543\\d{2}|
34432\\d4"

Then you can use Pattern.compile (REGEX_LIST)
and used Matcher to match my input against the REGEX_LIST.