Need to select a part of a text by using regex

i need only the BIC value, i am using regex but its taking everyting after “BIC:”

image

image

How can i change the regex to have only what between “BIC:” and “BIC into the clipbord”

website :https://www.ibancalculator.com/

HI @Soudios

How about this expression?

System.Text.RegularExpressions.Regex.Match(Inputstr,"\S+(?=\s+BIC)").Tostring.Trim

Regards
Gokul

1 Like

@Soudios

System.Text.RegularExpressions.Regex.Match("BIC: BFCRBDCDC  BIC","(?s)BIC:\s(.*)\s\sBIC").Groups(1).Match(Inputstr,"(?s)BIC:\s(.*)\s\sBIC").Group

image

2 Likes

I changed the value to see if its working for every bic

image

i have a strange text

Hi @Soudios

Use assign activity and pass the above expression . Can you share the text here

1 Like

What activity are you using? Can you share the sample input here

Try to use Matches activity

Regards
Gokul

1 Like

image

Hi,

It might be easier to use Click and GetFromClipboard instead of GetText, as the following. Can you try this?

image

Regards,

1 Like

Can you shows us the input for Matches activity @Soudios

1 Like

here the input

image

Hi,

Can you try this syntax?

(?<=(\s*)BIS:\s).*(?=\sBIS)

Regards,
Bhagyshri

1 Like

Can you able to share the screenshot of your workflow @Soudios

1 Like

Here

image

@Bhagyashri_Wani
i have this issue

HI @Soudios

Can you share the Output of the Get Text activity.

Can you remove the Value in the Assign activity and try

Regards
Gokul

1 Like

The input :

Without value :

image

Not like this After the Get Text activity, Put a log message and pass the Out of the get text activity and send a screenshot @Soudios

1 Like

Its working with this sentense : \S+(?=\s+BIC)

Great , If you have query related to this topic @Soudios

1 Like

@Yoichi

its working too but its not the subject of this topic

Thank you for your solution