I need to remove first - symbol
Example:(-(-100+123)+(78+9)-(45+67))
Output should be
Example:((-100+123)+(78+9)-(45+67))
I need to remove first - symbol
Example:(-(-100+123)+(78+9)-(45+67))
Output should be
Example:((-100+123)+(78+9)-(45+67))
Hi @sruthesanju
Try this
System.Text.RegularExpressions.Regex.Replace(ā(-(-100+123)+(78+9)-(45+67))ā,ā(?<=^()\Sā,āā).ToString
Regards
Sudharsan
need to remove first - symbol
Example:-(-100+123)+(78+9)-(45+67)
Output should be
Example:(-100+123)+(78+9)-(45+67)
Use this
System.Text.RegularExpressions.Regex.Replace(ā-(-100+123)+(78+9)-(45+67)ā,ā^-ā,āā).ToString
Regards
Sudharsan
Hello @sruthesanju
below should work fine for you
Log message = "-(-100+123)+(78+9)-(45+67)".Trim("-"c)
but remember it is going to trim all of the - at start or end like below
log message = "----(-100+123)+(78+9)-(45+67)-----".Trim("-"c)
will out put this ā(-100+123)+(78+9)-(45+67)ā
Update: Corrected syntax for trim from Trim(ā-ā) to .Trim("-"c)
It will check the above screen shot
Hi @sruthesanju,
yourValue = "(-(-100+123)+(78+9)-(45+67))"
yourValue = "(" + yourValue.Substring(2)
Regards,
MY