I am using regex to handle the data. Currently I used "tokenize" to spot the parts I want to return but I found a problem. The problem is if I put some cases at the beginning and at the end will provide different results. Probably because the target field has properties of two cases but regex returned the first match only(less complicated case is returned). If I reverse the sequence of the cases, it works well. Does it mean there is a sequence on regex to execute the matching process? What should I write (now I use "|" to separate) such that I can include both cases without considering the sequence?
Plus I need to replace a field with new patterns, is it possible to output as a new column except using formula tool? Regex seems cannot work if there are some data with other pattern and can only replace the same field.
case 1: [[:alpha:]]{5,13}\d{4,7}|\w{13}-\w{1,3}

case 2: \w{13}-\w{1,3}|[[:alpha:]]{5,13}\d{4,7}

Thanks so much!