I'm having a problem using "or" validating in RegEx. I want to validate that the user has entered either a 5 digit US Zip Code, or 3 digit Canadian Postal Code, but the Regex fails to recognize the pip as an or. It sees it as a literal character instead. Here is my RegEx pattern: \d{5}|[A-Z][0-9][A-Z].
I'd appreciate any guidance. Also, are there any limitations on RegEx in the SF libraries that I should be aware of?
Thank you