There can be used in the wordfile:
The expression in the marking group searches anywhere in file for an opening square bracket where next is neither MYDEFINE nor DEFINE because of the negative lookahead defined with (?!…) and one more more characters except newline characters non-greedy and a closing square bracket.
Note: UltraEdit expects just one function definition within a line. There is displayed in the function list only [#FUNCT_M=25] for the line:
The Perl regular search expression matches also next [$;ACHSEN ZURUECKSETZEN] but UltraEdit does not run one more search with the defined regular expression on a line for which an expression like above found already a string to display in the function list.
There can be used the following extended expression to get both square bracket strings listed on one line in the Function List view.
There is added in comparison to above a non-capturing group around the expression to find a string in square brackets with neither MYDEFINE nor DEFINE after [ with the multiplier + for not stopping the search already on first positive match but continue the search for even more such strings in square brackets. I post the expression here once more with colors to easier see which round brackets are a pair and which multiplier (formatted bold) belongs to which round bracket pair:
((?:\[(?!(?:MY)?DEFINE).+?])+)
Code: Select all
/TGBegin "Squared strings"
/TGFindStr = "(\[(?!(?:MY)?DEFINE).+?])"
/TGEndNote: UltraEdit expects just one function definition within a line. There is displayed in the function list only [#FUNCT_M=25] for the line:
Code: Select all
#bloc = YES,[#FUNCT_M=25][$;ACHSEN ZURUECKSETZEN];There can be used the following extended expression to get both square bracket strings listed on one line in the Function List view.
Code: Select all
/TGBegin "Squared strings"
/TGFindStr = "((?:\[(?!(?:MY)?DEFINE).+?])+)"
/TGEnd((?:\[(?!(?:MY)?DEFINE).+?])+)
- (…) is a capturing group which defines what to display in the function list which is here the entire found string.
- (?:…)+ is a non-capturing group to find one or more strings matched by the expression inside which means multiple strings in square brackets with neither MYDEFINE nor DEFINE after the opening square bracket.
- (?!…) is a negative lookahead to check if there is after the opening square bracket not a string as defined by the expression inside.
- (?:…)? is an inner non-capturing group with the multiplier for zero or one times.

