steven_parker
Apprentice

Regular Expression - Approver Comments

Can someone help me with the proper Regular Expression to convert this:

STEVEN PARKER (Reject) 9/23/2016 1:44 PM - 9/23/2016 1:45 PM (STEVEN PARKER) This is denied

Into this:

STEVEN PARKER (Reject) 9/23/2016 1:45 PM:  This is denied

With a colon after the time would be nice, but isn't a deal breaker.  I am just having a hard time understanding regular expressions.

0 Kudos
Reply
2 Replies
steven_parker
Apprentice

Re: Regular Expression - Approver Comments

No regular expression experts here?

I don't really have a way to "Find/Replace" with this string...name changes, date changes, etc..

0 Kudos
Reply
steven_parker
Apprentice

Re: Regular Expression - Approver Comments

I found a bit of a work around for those curious.

I used a Regular Expression and split this:

STEVEN PARKER (Reject) 9/23/2016 1:44 PM - 9/23/2016 1:45 PM (STEVEN PARKER) This is denied

into this:

STEVEN PARKER (Reject) 9/23/2016 1:44 PM 

9/23/2016 1:45 PM (STEVEN PARKER) This is denied

Stored those 2 variables in a collection in the Regular Expression and used a for loop to pull them from the collection into variables.

Then I worked with each element individually and used a small regular expression to extract what I needed and then used a build string to put the fields together so in my list it looks like this:

STEVEN PARKER (Reject)

9/23/2016 1:45 PM 

This is denied

Looks a lot cleaner this way.

0 Kudos
Reply