Use regular expressions in the Find dialog

The cross reference in AX is to me a very important tool to stay on top of things. I use it for research trying figure out how things are connected and I use it when I refactor code to see if I need to change any surrounding code. In our development environment we have had a period where the cross reference has been incomplete though, which has forced me to use the Find dialog a bit more than I usually do.

The search criteria you enter in either "Named" or "Containing text" is treated as a regular expression, so you are able to some interesting things here. However the interpreter of the regular expression is the internal AX match function, so there are limitations to what you know from for example .NET RegEx.

Here a few of the expressions I find most useful:

<    Means "begins with". To find methods with a name that begins with "Free" you can search for "<Free".

>    Means "ends with". To find methods with a name that ends with "MST" you can search for "MST>".

To find static methods or particularly usage of enum you'd be tempted to search for something like "LedgerAccountType::Heading", but this won't work. The colons are treated as controlling characters for the regular expression and you need to escape these characters with a backslash, like this "LedgerAccountType\:\:Heading".

You can also search for a particular value in a particular property by using regular expressions. For example to find all configuration key properties with the value "BOM" you enter "ConfigurationKey *#BOM" in the "Containing text" field and search in "All nodes".

I'd love to receive your favorite regular expressions from the Find dialog.

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm

Comments

  • Anonymous
    April 12, 2007
    The comment has been removed
  • Anonymous
    April 12, 2007
    I am using the following re often for finding assignments to the variable: VariableName: *= where VariableName should be replaced with name of particular variable