Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

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.
0
soco180
Asked:
soco180
  • 2
1 Solution
 
ddrudikCommented:
^(?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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now