Regex Problem

  • Thread starter Thread starter Carlo Goretti
  • Start date Start date
C

Carlo Goretti

Guest
Hey!
Im trying to use regex but dosent get it to work..
That im want to make is that IF(a word starts with: "Skapa_Test_" or "Skapa_Prod_" or "Skapa_XX_" and ends with "Hej1" or "hej2" or "Hej3" or "Hej4" or "Hej5") OR (a word starts with "Skapa_Konv") then find that word.

Here is my code for that but dosent get it to work..


wordList = (from line in File.ReadAllLines(files) from Match match in Regex.Matches(line.ToLower(), @"((Skapa_Prod_|Skapa_Test_|Skapa_XX_)\w+(Hej1|Hej2|Hej3|Hej4|Hej5))|(Skapa_Konv)", RegexOptions.IgnoreCase) select match.Value).ToList();
Thankful for some help..
Best Regards

Continue reading...
 

Similar threads

C
Replies
0
Views
178
Carlo Goretti
C
E
Replies
0
Views
88
etl2016
E
Back
Top