Skip to main content
Nintex Community Menu Bar

Regular Expression is bewildering.  I know dozens of programming languages at a basic-intermediate level and this one throws me for a loop!  Yes I have seen all the documentation and did Google searches but I just don't get the logic. 

 

I have a workflow that I did not build and this Regular Expression pattern is not coming through like it is on the original list (rebuilding it).  Looks like the date format is even completely diffierent than the new one. 

 

All I need is the year from the date... In this case, 2019.

Variable holding the date contains: 4/23/2019 3:42:11 PM

 

Hi,

you can use this regex:

(d{4})

It say : I want the 4 consecutive digit, and in a date, there is no other 4 digit consecutive thant the year


It took out the year but left me with everything else... This was my output: 4/24/ 8:29:48 AM

Here is a video walking through how to apply the regex that @nico provided. It does work and you can import the workflow if needed.



 




Reply