How do I remove all special characters that text processor leave.

Discussion in 'C#' started by t7584, Nov 21, 2006.

  1. #1
    asp (vbs)
    How do I remove all special characters that text processor leave.
     
    t7584, Nov 21, 2006 IP
  2. t7584

    t7584 Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    special characters
    symbols of carriage returns and any special characters that are invisible text processor .
     
    t7584, Nov 22, 2006 IP
  3. t7584

    t7584 Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    special characters
    symbols of carriage returns and any special characters that are invisible in text processor.
     
    t7584, Nov 22, 2006 IP
  4. thedark

    thedark Well-Known Member

    Messages:
    1,346
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    168
    Digital Goods:
    1
    #4
    i don't know asp very well, but in php are 2 functions, preg_replace and str_replace, in asp should be some similar functions, check a manual.
     
    thedark, Nov 22, 2006 IP
  5. doronty37

    doronty37 Active Member

    Messages:
    130
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #5
    This function handles this. It removes all characters except small caps, capital letters, numbers..

    <%
    Function TrKarakterKontrol(Metin)
    	Set RegEx = New RegExp
    	RegEx.Pattern = "[^a-zA-Z0-9_]+"
    	RegEx.Global = True
    	RegEx.IgnoreCase = True
    
    	TrKarakterKontrol = Not RegEx.Test(Metin)
    End Function
    %>
    Code (markup):
    Source: http://forum.ceviz.net/showpost.php?p=201483&postcount=37
     
    doronty37, Nov 23, 2006 IP
  6. Thomas2006

    Thomas2006 Active Member

    Messages:
    105
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #6
    Good. Then we can use return value from TrKarakterKontrol to replace and get rid of unwanted chars.
     
    Thomas2006, Nov 25, 2006 IP