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



Regular Expression (regex) to grab a date in yyyy-mm-dd pattern from a longer string

asked on June 13, 2019

Example strings:



I played around with the tools at and came up with this expression:  ^.*?-([0-9-]+) which works for the first example, but I can't get anything to work with the second example string.  Can anyone provide some assistance?  The goal is to extract only the date in YYYY-MM-DD format from the Laserfiche entry name in a workflow task.



0 0


replied on June 13, 2019




1 0
replied on June 13, 2019 Show version history

Thank you so much for replying.  I believe I already came up with a working solution after doing some more digging around online and experimentation.  Since it had to be dynamic not only for text after the underscore, but also for single digit and double digit months and days, I came up with the following that seems to be working:



Although, in testing yours, I have found that your solution works just as well.  Thank you!





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

Sign in to reply to this post.