in reply to Re^3: Regex pattern that fails when string contains a certain pattern
in thread Regex pattern that fails when string contains a certain pattern

I'm willing to provide code - but I have to write it first. I tested my pattern within a regex-testing GUI.
  • Comment on Re^4: Regex pattern that fails when string contains a certain pattern

Replies are listed 'Best First'.
Re^5: Regex pattern that fails when string contains a certain pattern
by Corion (Patriarch) on Dec 22, 2016 at 09:51 UTC

    After you've added some more specifications, let me recommend that you don't use a single regular expression. While it is still possible to create a regular expression that matchess your description, three if statements convey your rules much better.