Skip to main content

Hi Guys,

I am trying to wrap my head around regex formula but can't figure out what if there are two patterns in the string. Basically I want to extract the number after the bracket but before the "+".

Current value : /Date(1676537746330+0000)/

Desired value : 1676537746330

 

Thanks

Hi @Hendrik_Yang ,
You didn't mention whether the last four digits are always 0000, but here it is both ways:

If always 0000, then the formula is:

VALUE(REGEX_EXTRACT({Orig value}, "Date\\((\\d+)\\+0000\\)", 1))

If those last four change, then use:
VALUE(REGEX_EXTRACT({Orig value}, "Date\\((\\d+)\\+\\d{4}\\)", 1))

Hope that helps!
- Ron

Hi @Hendrik_Yang ,
You didn't mention whether the last four digits are always 0000, but here it is both ways:

If always 0000, then the formula is:

VALUE(REGEX_EXTRACT({Orig value}, "Date\\((\\d+)\\+0000\\)", 1))

If those last four change, then use:
VALUE(REGEX_EXTRACT({Orig value}, "Date\\((\\d+)\\+\\d{4}\\)", 1))

Hope that helps!
- Ron

Hi @Ron_Daniel ,

Brilliant! Thanks a bunch! 


Reply