extracting date from filename - VisualCron - Forum

Community forum

  •  Ujma
  • Paid support Topic Starter
HI there,

From this file name : aaaa_abc_xyx_59_mno_asd_qwe_April_1_2020_06_18_1523.xlsx I want to extract "April_1", how can I do that I have tried substring but as month name is changing I am not able to use it and also I have tried REGEX grouping but how can I define group for month as month name is changing, can someone please help me with this?

Same problem with this file name : abcx_qwer_lmn_April_2_2020_xyz_1_2020_06_18_1523, I want to extract "April_2_2020" from this.

Thank You.
James Hagist
In looking at your 2 examples it appears that the file names are not consistent? If so it is going to be impossible to us a regex or string manipulation to extract that date.

Have you thought about using a file watcher trigger with a file rename action? The idea is to monitor the FTP (etc) for new files dropping and then immediately rename them to something you can use?

A thought...
  •  Ujma
  • Paid support Topic Starter
These 2 files are process by 2 separate Jobs (there are multiple files) , so we can use regex for that.
Based on your asking "how can I define group for month as month name is changing," I think this is probably more of a basic (intermediate?) regular expression question than a Visualcron question, although the Visualcron function usage wrapped around it is still of course relevant.

First example:


Second example:


Fantastic place to learn about regular expressions, because I don't intend to explain how the above works:


Scroll to Top