How to use Regular Expression to identify a string containing the word ATB and does not contain the word MEDICAID and ends with XLS

I need to use Regular Expressions to identify file names by this criteria:
  1 contains the word ATB
  2 does not contain the word MEDICAID
  3 ends with XLS
  4 search pattern is case insensitive.
LVL 2
soco180Asked:
Who is Participating?
 
ddrudikConnect With a Mentor Commented:
^(?i)(?=.*ATB)(?!.*MEDICAID).*\.XLS$

If (?i) doesn't work for you, remove it from the pattern and set case-insensitivity in your app/lang.
0
 
ozoCommented:
^(?i:)(?!.*MEDICAID).*ATB.*XLS$
0
 
soco180Author Commented:
That was exactly what I needed. Thanks for the quick response, I really appreciate it!
0
 
ddrudikCommented:
Thanks for the question and the points.
0
All Courses

From novice to tech pro — start learning today.