Start a new topic

Regular expression needed

I need to change credit card expiry date format from Month-YY (such as Dec-22) to 12/2022 when importing. Can anyone help to create regular expression dictionary? Thanks in advance.



I need Parkway or Pkwy to be translated to Pky. Do you have exist dictionary?


Catherine

Thank so so much, Isaac. It works. 

P.S. Sorry, I misread the part where the input is just a two digit year.


But since we are still in the first quarter of the century (and since we know we won't have to deal with any dates earlier than the current year or any dates really, really far in the future), the previous example can still work with small modification.

Notice now the Replacement value is "12/20" instead of "12/".  I only did December this time.  



image



The rest is as the previous example, except the replacement values are like: "12/20", "11/20", "10/20", etc.


I tested this, and it seems to work. 

image



I have only gone as far as Oct since this is just an example.

Essentially, you just try to set it up as if it were a non-regex thing-- in other words literal string replacements. Then tell Omatic you want it to act as a regex.  


All we are really wanting Omatic to do is literal replacements.  But I guess Omatic looks at, for example, "Dec-2022" as a single "word" because there are no spaces.  And Omatic won't replace just parts of a word unless you tell Omatic this is a regex.

image

image

image


You would continue the pattern for the other nine months.

Login or Signup to post a comment