I'm trying to learn how to use regex to remove all gibberish characters from a string except for alphanumeric and : . and the newline character, whatever it may be.
I am using this
TextBox1.Text = Regex.Replace(TextBox1.Text, "[^:.0-9a-zA-Z ]+?", "")
But my result seems to remove all the newline characters too, I thought this is what the ? at the end of the regex query did, tell it to exclude the newline character from the replacement?
Thanks for your input guys