I have the following input:
Person 1kg
To get the expected output:
Person 1kEq
I am using the following pattern:
string.Format(@"(?<!\S){0}(?!\S)", Regex.Escape("kg"));
Regex.Replace(inputSentence, Pattern, "kEq");
The Regex.Replace does not replace kg with kEq.
If I edit the input sentence to Person 1 kg the replacement happens,
Could someone help me with the pattern for this?