You are viewing limited content. For full access, please sign in.

Question

Question

Correct Pattern Match Error with token edit

asked on June 17, 2016

We have a problem with an OCRed pattern match for various dates.

Example: 17-Jun-2016 (which is the format a program we use for operations displays dates, we cannot change this) is read as 17-3un-2016, the same has been true of Jan and Jul. I use this date in a workflow for metadata, filing, etc.

I’m trying to keep the ‘17-‘ and ‘-2016’ and replace the 3un with Jun.   I cannot seem to figure out how to replace/edit the middle of the token.

Darren

0 0

Answer

SELECTED ANSWER
replied on June 17, 2016

Okay,

I have found a solution, but it is a bit 'ugly' I think.

1) grab the first 1 or 2 digits with \d{1,2}- from the pattern match in an Assign/Create Token Value (First)

2) grab the last 4 digits with -\d{4} in a 2nd Assign/Create Token Value (2nd)

3) Modify the initial date token to %(First)Jun%(2nd)

This gives me the 17-Jun-2016 I need.  Unsure if there is a better way.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.