Author Topic: Regex example for "string does not contain substring"  (Read 2425 times)

stahl

  • Jr. Member
  • *
  • Posts: 67
  • IMatch user since 2004 (Ver. 3.4)
Regex example for "string does not contain substring"
« on: May 15, 2014, 12:18:53 AM »
Hello Mario,
it might be a good idea to add information in the help documentation on how to use regular expressions to make sure a string or file name does not contain a given substring.

I my naming convention a suffix character (a hyphen) signals that a given file is a derivative. If there is no hyphen in a file name, it's an original. So, for the master expression in Preferences - File Relations, I need a regex to check that there is no hyphen in the file name.

The regex I found to do this is "^((?!-).)*\."

So far, there is no support on how to do this in the help documentation, but I think it could help quite a couple of users.

Cheers, Stef

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
Re: Regex example for "string does not contain substring"
« Reply #1 on: May 15, 2014, 07:49:08 AM »
Hi, I suggest you add this as a tip in the board we have for this purpose:

https://www.photools.com/community/index.php?board=44.0