Use Regex to edit text

Hi,

I am working on a project using a robot to identify text in a document and edit/update it with a new text entry.

For example, I wish to search my document for the text “Tumor type” and then update the text with “Tumor”.

I have built a simple bot to read my text file and I wished to use a Regex expression to find all “Tumor type” entries and replace with “Tumor”

I include a picture of my project, which currently writes the text for my variable “Text” in a message box.

The idea would be for my message box to display the new text with “Tumor” instead of Tumor type displayed.

Many thanks

Andrew

Hi @andrew.haworth

You can try with Regex Expression

System.Text.RegularExpressions.Regex.Replace(YourString,"Tumor type","Tumor").Tostring

Regards
Gokul

1 Like

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