Filtering out "bad" characters

Results 1 to 2 of 2

Thread: Filtering out "bad" characters

  1. #1
    Join Date
    Dec 1969

    Default Filtering out "bad" characters

    Can someone help me with the following problem:<BR><BR>I need to pass the following characters: A-Z a-z 0-9 space<BR>and change all other characters to: -<BR><BR>What regexp will do this? I am using<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: Filtering out

    Not sure how RegExp work in C#, but...<BR><BR>You need an expression like this:<BR><BR>[^a-zA-Z0-9s]<BR><BR>In vbscript, you&#039;ll use the replace function:<BR><BR>newString = objRegExp.Replace(oldString,"-")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts