Regular expression notation is a compact way of specifying a group of strings that all match some criteria. A target string is said to match the regular expression if it is a member of this group of strings. Regular expressions are character strings in which plain text indicates that that text must exist in the target string, and special characters are used to indicate what variability is allowed in the target strings.
In AC Browser this kind of notation is used in a variety or ways : while searching
files, searching text in files, in
Quick Access Bar, in
selecting files (on Numpad + keystroke), in Quick
Search.
So this general rules below concerns all these windows.
Ordinary characters. Any character that is not used in other sorts of regular expression syntax is an ordinary character. To match the regular expression, the target string must have that same character in the same position as it occurs in the regular expression. For example, the single character regular expression “g” indicates that the target string must have a “g” in the appropriate position.
Escaped special characters. The characters left bracket ([), right bracket (]), asterisk (*), question tag (?) are special in that they are used to form other types of regular expression syntax.
?
Any single character. ?onrad matches Konrad and Conrad. Let sleeping ???? lie – can be dogs, cats and other 4-letters animals.
*
None or more of the preceding characters or expressions. For example, ba*c matches bc, bac, baac, baaac, and so on.
[ ]
Any one of the characters contained in the brackets, or any of an ASCII range of characters separated by a hyphen (-). For example, b[aeiou]d matches bad, bed, bid, bod, and bud, and r[eo]d matches red, rod, but not reod or roed. x[0-9] matches x0, x1, x2, and so on.
Examples :
[a-zA-Z0-9]
Any single alphanumeric character.
[a-zA-Z]
Any single alphabetic character.
[0-9]
Any decimal digit.
[0-9a-fA-F]+
Any hexadecimal number.
Note that using Regular Expression when matching file names (eg. searching files with
Alt+F7 is slightly different that searching text in files. When there is no dot (.) in a file name, AC treats it like “match any file which HAS the letters”. This is done… by adding asterix (*) on both sides of expression. So ‘win’ will be replaced with ‘*win*’ so windows or helpwin will be found. This is what user would expect I think. When there is a dot in a specified file name – AC doesn’t change anything, so win.* is win.*, so windows or helpwin will NOT be found. Only win , with any extension, will be. It is important in : Searching files with F7, filtering files on Quick Access Bar and Selecting files with Numpad+.It doesn’t apply to searching text in files.