XML : Python Regular Expression - Match certain first characters but not a W

I have 2 different file names that I am comparing: PP_AUTOWELC.xml - needs to go to location 1 PP_WELCOMEKIT.xml - needs to go to location 2

There are also a bunch of other PP_Documents that need to go to location 1.

What is the regular expression to match everything "PP_" and then the next character will be anything but a "W".

I thought it was PP_[^W]*.xml but that doesn't allow any of the characters following PP_ to be a "W".

No comments:

Post a Comment