Can someone help me understand the following statement from the Apex Developer Guide? I'm trying to understand regular expressions, but this statement has me a bit confused, and I can't figure out how/when a developer could hit this limit:
Salesforce limits the number of times an input sequence for a regular expression can be accessed to 1,000,000 times. If you reach that limit, you receive a runtime error.
How/when is a regular expression accessed? Can you give a simple use case of when something like this could happen?
The reason I'm asking, is that we are planning to put a batch process in place to evaluate all phone fields on our Accounts and Contacts, and if the country code is US or Canada, we'll add (if it's not already there) a '+1' to the phone number so that the number can be auto-dialed from any country of origin. We have 5 phone fields on Contact alone, and we're concerned about limits.