Regular Expression Support
Regular expressions are notations used for describing patterns of text. They are a form of meta-characters, or characters that define other characters. The regular expressions supported by NetLinx Studio are described below:
| Supported Regular Expressions | |
|---|---|
| Regular Expression | Description |
| ^ | Represents the beginning of a line.For example, "^x" only matches an "x" that occurs at the beginning of a line. |
| $ | Represents the end of a line.For example, "$x" only matches an "x" that occurs at the end of a line. |
| . | Represents any character.For example, " x.y" matches " xay" and " xzy" but not " xy" or " xyxy". |
| * | Specifies zero or more occurrences of the previous "." or literal character. For example, x*y matches " xzy" or " xy". |
Regular Expression Special Characters
The following regular expression special characters are supported for Regular Expression search operations:
| Supported Regular Expression Special Characters | |
|---|---|
| Special Character | Description |
| . | Matches on any character. |
| ( | This marks the start of a region for tagging a match. |
| ) | This marks the end of a tagged region. |
| \n | This refers to the first through ninth tagged region when replacing (where n is 1-9). For example: if the search string was Fred([1-9])XXX and the replace string was Sam\1YYY, when applied to Fred2XXX this would generate Sam2YYY. |
| \< | This matches the start of a word. |
| \> | This matches the end of a word. |
| \x | This allows you to use a character x that would otherwise have a special meaning. For example: [ would be interpreted as [ and not as the start of a character set. |
| [...] | This indicates a set of characters. For example: [abc] means any of the characters a, b or c. You can also use ranges. For example: [a-z] for any lower case character. |
| ... | The complement of the characters in the set. For example: A-Za-z means any character except an alphabetic character. |
| ^ | This matches the start of a line (unless used inside a set, see above). |
| $ | This matches the end of a line. |
| * | This matches 0 or more times. For example: Sa*m matches Sm, Sam, Saam, Saaam and so on. |
| + | This matches 1 or more times. For example: Sa+m matches Sam, Saam, Saaam and so on. |