Regex expressions – User reference

A RegEx expression, or Regular Expression, is a set of characters that make up a search pattern, mainly used for the search of char subchains. Applied to the contents of an object’s file and folder structure, it allows for selecting the files or folders of the object to which to apply a specific action.

RegEx expressions are a standard in the computer world, although there are several variations depending on the field of application. RegEx expressions used in LIBSAFE follow the behavior defined for these expressions in .NET development and production environments. You can find a full reference for them in the MSDN pages https://msdn.microsoft.com/en-us/library/az24scfc(v=vs.110).aspx, as well as in a large number of web pages.

It is of high importance, or even of critical importance, to pay an extraordinary attention when writing RegEx expressions, as they are strictly applied by the system, and their way of building differs greatly from the use of any other common tool, for an average application user. For those users not fully understanding the use of these expressions, it is recommended that they copy the value for selecting all elements in places where the expressions are needed; this value is available in the accompanying help text in the interface.

Some common errors when writing a RegEx expression: forgetting that patterns are case sensitive by default, misunderstanding that character sequences are not the same as character sets, inserting blank spaces in expressions without realizing that the space becomes part of the chain pattern, ...

It is also important to understand that the general use of RegEx expressions goes far beyond the use that is made of them in the application. Elements such as grouping and self-references are not used by LIBSAFE.

To make it easy to insert expressions, you can find a set of examples hereafter. Beware, that in some occasions there may be more than one pattern to achieve the same result.

From the previous examples, the following operators should be highlighted:

  • ^ -> to indicate the start of the chain.

  • $ -> to indicate the end of the chain.

  • (?i) -> to set case insensitive checking.

Last updated