Regular Expressions in Script Search
The old way to search was to enter multiple texts. We split by space characters and take each word and search for all them in a line. If all are found, the line turns yellow. That is what you know and we expect that the majority of users only types one thing to find. But there is a small fraction of power users, that ask for more.
For version 13.1 we use regular expressions for each of this words, so you can do OR searches or search with wildcards better. But since you like to search for $ variables, we escape a $ or $$ on the beginning of the search word for you. Otherwise you may do backslashes for escaping some special characters like $ or brackets.
Let us show you a few examples:
$abc
If you search for a text, it finds all lines with this text.
Set $abc
Finds all lines, which contain set and $abc as text anywhere. e.g. a Set Field which uses the variable in the expression.
^Set
We use our first regular expression here. The caret character defines the beginning of a line, so this searches for all lines starting with Set, e.g. Set Variable or Set Field.
^Set $abc
This finds lines starting with Set and which have $abc somewhere too.
Feld|Field
Find either Feld or Field in a script line.
\].$
This finds all lines ending with a square bracket. When we query text from FileMaker, the line gets an extra space, so we need to put a dot in the expression and find the all lines ending in the square bracket.
$m(.*)x
This finds variables with a name starting in m and ending in x.
\bError
Search for Error as text in front of a word. \b is the delimiter for a word boundary.
Feld\[\d
Find field access by index with a digit.
\bclaris:|\bfmp1?9?:
Find fmp URLs with optional the version or the claris scheme. And it must start with a word boundary.
Feel free to try this with the 13.1pr2 version and let us know if you have problems, suggestions or questions.
See also SyntaxColoring.ScriptSearchBox.SetRegEx function.