Wanted help in writing down a regex for replacing a value based on condition

Hello I am trying to write a regex that replaces the value of Title “Installing” with “Downloading” ,if the value of Title has square brackets, i don’t have to change

Here’s How the input looks like

Title="[Installing %=System.LinkedTitle.Installing%]", Value="Installing"
Title="Introduction"
Title="Storing equipment & lubrication"
Title="Installing the collector laterals" 
Title="Installing the mechanical scraper" 
Title="Installing the saturator system"
Title="Installing the sludge beach" 
Title="Installing the effluent weir"
Title="[Installing%=System.LinkedTitle%]"

And the output should look like:

Title="[Installing %=System.LinkedTitle.Installing%]", Value="Installing"
Title="Introduction"
Title="Storing equipment & lubrication"
Title="Downloading the collector laterals" 
Title="Downloading the mechanical scraper" 
Title="Downloading the saturator system"
Title="Downloading the sludge beach" 
Title="Downloading the effluent weir"
Title="[Installing%=System.LinkedTitle%]"

@hansen_Lobo
Here’s an example of how you can use this regex pattern in UiPath:

  1. Assign the input string to a variable, let’s call it inputString.
  2. Use the “Replace” activity in UiPath.
  3. Configure the “Replace” activity as follows:
  • Input: inputString
  • Pattern: (?<!\[)Installing(?![^[\]]*%])
  • Replacement: "Downloading"
  • Result: Create a variable, let’s call it outputString, to store the replaced string.

I want the value to change just for Title= ,Not for value=
The regex expression provided by you works, but i need only for title


  1. ] ↩︎

@hansen_Lobo let me check again

@hansen_Lobo
Try this one.

I want the values in between also be highlighted

Title="abc the mechanical abc scraperabc" value="abc"
image

@hansen_Lobo is it part of that string or its separate one.

part of a string

@hansen_Lobo give full string