Regular Expressions (or (RegEx) are a powerful and concise way of parsing textual data. Although their definitions initially appear arcane, with only a little experience a large number of text parsing problems become easily solvable. Different implementation of RegEx sometime have slightly differing implementations of its functions. A tutorial on the Java RegEx implementation can be found here.
Many RegEx patterns used in Mango are similar. Typically the intension is to locate a particular value in some text. As such, the pattern will consist of prefix and suffix strings that uniquely identify the value, and a group pattern that extracts the value. For example, the text to parse may look like this:
This is the text to parse with my value of 1234 embedded in the middle,
If the desired value is the "1234", a RegEx pattern that works may be:
my value of (.*?) embedded
The important point is that the prefix (i.e. "my value of ") and the suffix (" embedded") never change betwen new instances of the text, and that they uniquely define the location of the desired value. At the extreme, note that the prefix "f " and suffix " " also work in this case, but are less like to work in larger texts, or if the text changes significantly.