There is one additional space after doing replace.
In this example there are 2 space before Country. How to remove that space also.
In this example We have to remove $IsFalg=‘’’ where $ is space
So where ever there is null I want to remove that part.
As your string may also have more keys which do not have values in it, you can use the following matches and use .replace activity recursively in a for loop.
\s(?<EmptyKeys>\w{1,20}="")
Look for empty space,
Name the group as EmptyKeys,
Look for word characters of minimum length 1 and maximum of 20,
Look for equal sign and “”
This will take care of the extra spaces when you remove the matched strings.