IMatch Discussion Boards > Online Help and other Documentation

Regex example for "string does not contain substring"

(1/1)

stahl:
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:
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

Navigation

[0] Message Index

Go to full version