Issue with Regular expression multiline On Studio

Hi,

I have this Regex that works fine on https://regexr.com/ but not on Studio ^(.*\S)\s*$

I need to get sentances separated by line breaks ex : TestBranch FRANCE UAT01 TestBranch FRANCE UAT1 TestFelix
gets me 3 matches. It work on website beacause use /m for multiline but i dont find a way to do it on Studio. Can someone help ?

Can you try either of the following?

use Multiline option of Matches activity

image

use argument of Regex.Matches or Regex.Matches method.

 System.Text.RegularExpressions.Regex.Match(yourString,"^(.*\S)\s*$",System.Text.RegularExpressions.RegexOptions.Multiline)

use inline option

(?m)^(.*\S)\s*$

Regards,

Hey @felix.allaire

image

Declare the variable as follow and in assign give

you will get as array of matches then you can use for each activity to get each match.

image

Type argument select match collection

image

Hope this will help you.

Cheers.

5 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.