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

Question

Question

Regular Expression Assistance

asked on May 7, 2020

I'm sure this is a simple expression, but I'm struggling.  I'm trying to create a new token value that contains everything except the trailing date.  I need the token to contains everything in bold (after the last space).  

 

zTestCorp - ZTest Event 3 - Adden - Start Date Change - 5/18/2020

 

Thanks!

0 0

Answer

SELECTED ANSWER
replied on May 7, 2020

I'm assuming that the text you provided you have already captured in a pattern

You could use this to exclude the date as one option

[^\d{1.2}/\d{1,2}/\d{4}]

 

Or something like this 

(.*)\s\d/\d{1,2}/\d{1,2}

2 0
replied on May 7, 2020

Thanks Steve!  I think this is 2nd time you've provided expression help.  Appreciate it!

0 0
replied on May 7, 2020

I hope to get better over time, practice, practice, practice :)

FYI, I think there is a mistake in the second one, it just happened to work

(.*)\s\d{1,2}/\d{1,2}/\d{4}

0 0

Replies

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

Sign in to reply to this post.