I need to remove non printable characters from various textarea’s. Most importantly, linefeed and carriage returns.
I suck at regex! I do have one to replace any non alpha numeric characters. What would I use in the code below for a search pattern to just remove control codes?
Dim reg as new RegEx
reg.searchPattern = "[^a-zA-Z0-9]"
reg.replacementPattern = ""
reg.Options.ReplaceAllMatches = True
Dim source as string = item
Dim result as string = reg.replace( source )
Return result
Thanks!
4 posts - 3 participants