Start a new topic

Help RegEx to check year of date is this year or next

We are having trouble importing from xlsx files that sometimes the date is imported incorrectly e.g. 18/6/2016 was imported as 1/9/4253 when the source file was xlsx instead of csv. Most recently this has happening with gift date and action completed date.


I would like to use RegEx and the Skip Row exception to prevent such imports but am a beginner with regular expressions and don't know where to start. Just rejecting dates that do not have the year of 2016 or 2017 would be great. I don't mind updating the dictionary once a year.

1 Comment

Hi Catherine,

I believe this should work for you.

Values to match on: ^((?!2016)(?!2017).)*$
Replacement value: Skip Row

Place a check mark next to both Use Regular Expressions and Create Exception (skip row). Be sure when you are copying and pasting this into your dictionary that there are no extra spaces at the beginning or end.


Login or Signup to post a comment