Message Sets: Performance considerations when using regular expressions

Take care when specifying regular expressions: some forms of regular expression can involve a large amount of work to find the best match, which might degrade performance.

Other expressions might produce a result that you did not expect.

For example, to match text up to and including a delimiter character ';' do not use the pattern ".*;", which matches up to the last ';' character in the message, including all prior ';' characters in the matched text. Instead, use the pattern "[^;]*;".

Similarly, avoid using the pattern ".*", which always forces a search to the end of the message to try and find the best match, and therefore might result in poor performance. However, you must use the pattern ".*" if you intend to match all remaining data in a message.

For best performance, avoid expressions with redundant nested repeats, such as "([0-9]+)*". Keep the expressions simple, with precise matching criteria. Simple expressions avoid the need to perform multiple searches for the best match.