Last post Aug 17, 2020 08:50 AM by PatriceSc
Aug 17, 2020 05:53 AM|qsoft_developer|LINK
I need your help with how to replace a string, but only in case the char before the string is not a digit.
str= "4# + aaabb 14# 34#asd "
I need to replace "4#" with Z and the result should like like this:
result str="Z + aaabb 14# 34#asd"
Aug 17, 2020 08:50 AM|PatriceSc|LINK
in case the char before the string is not a digit
Unclear. Do you mean that if a string starts with 4# you want to replace that part with Z ?
See perhaps https://docs.microsoft.com/en-us/dotnet/api/system.string.startswith?view=netcore-3.1 and have a look at other string function as well. For now
the problem could be that the exact intent is not yet well defined.