Hi, please i need helo, i read 3 differences pdf similar data. I have to make a regular expression, i have to remove blank space and special characters. My regular expression is
and the string is
DEMANDADO :FRANCISCO JAVIER SEGURA GODOY
at the end the string have to be FRANCISCO JAVIER SEGURA GODOY.
Please Help Me
to Remove Special Caracters use the following function:
System.Text.RegularExpressions.Regex.Replace(MyText, “[^a-z A-Z]”, “”)
To Remove empty spaces from the beggining and end of your strings use the Trim function:
Please let me know if you have any more questions.
Thanks. It work. But i have a question I have thsi result:
ORTEGA PEREZ JUAN FERNANDO RUT
and i like to remove the word RUT, can you help me please
Hy Hector, I am glad I could help you!
You could do the following:
MyString = “ORTEGA PEREZ JUAN FERNANDO RUT”
MyStringADJ = MyString.Remove(MyString.LastIndexOf(" "))
the result will be
MyStringADJ = “ORTEGA PEREZ JUAN FERNANDO”
Please like my post and mark my answer as solution!
Thanks my friend, im relaly new in this and i like to khow more. One last question if the word if i want to remove is in the middle o in another position of the string the solution should be??
You could remove a specific word like this:
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.