I'm trying determine the shipper from the tracking number using regex in a workflow rule formula. Similar too: https://stackoverflow.com/questions/619977/regular-expression-patterns-for-tracking-numbers
except when I escape the "/" for the editor the regex fails to match... so I'm kinda stuck.
Here is my original regex:
/\b(1Z ?[0-9A-Z]{3} ?[0-9A-Z]{3} ?[0-9A-Z]{2} ?[0-9A-Z]{4} ?[0-9A-Z]{3} ?[0-9A-Z]|[\dT]\d\d\d ?\d\d\d\d ?\d\d\d)\b/i
Here is my formula from the editor
IF(REGEX(Tracking_Number__c, '/\\b(1Z ?[0-9A-Z]{3} ?[0-9A-Z]{3} ?[0-9A-Z]{2} ?[0-9A-Z]{4} ?[0-9A-Z]{3} ?[0-9A-Z]|[\\dT]\\d\\d\\d ?\\d\\d\\d\\d ?\\d\\d\\d)\\b/i'), "http://wwwapps.ups.com/WebTracking/processInputRequest?HTMLVersion<br>=5.0&sort_by=status&loc=en_US&InquiryNumber1="+ Tracking_Number__c, "")