Lets you define regular expression patterns to use for Search & Replace. You can define an arbitrary amount of Search & Replace patterns that are executed in the order defined when formatting a file. The list component displays all patterns currently defined. Use the button bar on the right to add, remove or change patterns and define the order in which the patterns should be applied.
Jalopy uses Java’s build-in regular expression engine which is roughly equivalent with Perl 5 regular expressions. The syntax is explained here: http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html. For a more precise description of the behavior of regular expression constructs consult Mastering Regular Expressions [Friedl97].
Lets you add new Search & Replace patterns. Pressing the button will invoke a new dialog where you can enter the Search & Replace patterns.
Enter the search pattern in the Search for text field and the replace pattern in the Replace with text field. The replace pattern may contain variable interpolations referring to the saved parenthesized groups of the search pattern. A variable interpolation is denoted by $1, $2, or $3, etc.
Suppose you have the search pattern b\d+: and you want to substitute the b's for a's and the colon for a dash in parts of your input matching the pattern. You can do this by changing the search pattern to b(\d+): and using the replace pattern a$1-. When a substitution is made, the $1 means "Substitute whatever was matched by the first saved group of the matching pattern." An input of b123: after substitution would yield a result of a123-. For the given patterns
Tank b123: 85 Tank b256: 32 Tank b78: 22
would become
Tank a123- 85 Tank a256- 32 Tank a78- 22
Lets you alter an already defined Search & Replace pattern. This button is only available if an item is currently selected in the pattern list. Pressing the button will invoke a new dialog where you can change the Search & Replace patterns for the currently selected item in the pattern list.
Please refer to the section called “Add...” for an explanation of the available regular expression capabilities.
Lets you remove an already defined Search & Replace pattern. This button is only available if an item is currently selected in the pattern list.
Lets you change the position of an already defined Search & Replace pattern in the pattern list. This button is only available if an item is currently selected in the pattern list and this is not the topmost item.
Lets you change the position of an already defined Search & Replace pattern in the pattern list. This button is only available if an item is currently selected in the pattern list and this is not the last item.