RegEx in Studio Web

I’m trying to use Regular Expressions in Studio Web but it seems not available?

Anybody else who’s experiencing this? Thanks!

Hi @argin.lerit

I gave it a go and the IntelliSense has indeed failed here a bit, but it works correctly on runtime:

There is also this activity you can use:

As well as the Replace activity that has Regex functionality. And there is also a simple Find and Replace activity that doesn’t use Regex and can be used for simpler scenarios.

@argin.lerit
I thin it is intelligence issue and it is possible that you are using first time that’s why its not picking. Please write full expression and run it, it will run successfully.

Hi @argin.lerit

If you are using Set Variable value activity in Studio web give the below condition:

System.Text.RegularExpressions.Regex.Matches(yourStringinput,"Regex expression")

Hope it helps!!
Regards,

@raja.arslankhan @Parvathy - It’s giving me the red exclamation point that prevents me from running it even when the expression is complete.

@loginerror - How were you able to run the activity with the RegEx? The red exclamation icon does not show on your end? I was trying to replace System.Environment.NewLines and tried the Find and Replace Activity you shared and String.Replace method and not getting the result I wanted (NewLines remain in the string). For some reason it got “fixed” by running the Process in Serverless Cloud Robot instead of my machine. Still not sure what difference it made.

Thanks for the support

1 Like

Hi @argin.lerit

Place your string Input at the place of “yourstringinput” and regex expression in the place of “regex expression”. Ylu can .tostring if needed.

If you need further assistance send your input string and the required output.

Regards

Just to confirm. This should be fixed now in Studio Web :slight_smile:

1 Like