Skip to main content

Hi

I am trying to extract text from a multiple line column.

I am using a regular expression nintex action.

The multiple line text column it includes the text: Date_of_Request_dd_MMM_YYY_06MAR2017Number....etc..... What I want is to pull is only the date ie 06MAR2017. How do I say stop after the year. At the moment it pulls every starting Date_of_Request onwards.

I have use a reg ex pattern of Date_of_Request_dd_MMM_YYY_d{2}w+d{4}

Then update item - date of request column

Then I have a reg ex to remove Date_of_Requaest_dd_MMM_YY_

Then update item - date of request column Please advise. Thanks in advance

Try this:

200816_pastedImage_1.png


Hi Michelle Goodman‌,

Why not use the inline function "Substring" and the action "Build string". It looks like the characters are set at fixex positions.

Cheers,

Rick


This is a good site (RegExr: Learn, Build, & Test RegEx ) to practice getting the right RegEx pattern.  I often go here to figure out the pattern I need before configuring the RegEx action in Nintex. 


Hi Rick

How would I set this up?


Hi All

I have another text string I want to pull. For this one there is no set length of characters. Therefore I can't say end after the 4 digits. Any ideas?


Hi Michelle,

Can you post the entire piece of text, and highlight the bit that you want to extract?

Cheers,

Vadim


Hi Vadim Tabakman/all

I managed to sort this one, but I have a new one to sort.

So I have:

Input text: word 1 day_03-22-2018_2051332_words

I just want the extract only this part "2051332".

What pattern do I need?


Hi Michelle,

is that number always going to be 7 digits?  Is there a chance there will be 7 digits anywhere else in that piece of text?

Vadim


If that's the only string of 7 digits, you can use this :

d{7}

You can test it here: https://regexr.com/3n36b 


Yes - thank you!


‌. What would I do if there were two strings with 7 digits, and I only want to pull the 1st match?


You could still use the same Regular Expession, store it in a Collection variable and then use the Collection Operation action to "Get" the data in the first spot in the collection, into a text variable.


Reply