Regex, every non-alphanumeric character except white space or colon

Regex, every non-alphanumeric character except white space or colon

Asked on January 4, 2019 in Regex.
Add Comment


  • 2 Answer(s)

    Regex, every non-alphanumeric character except white space or colon by this code:

    [^a-zA-Z\d\s:]
    
    
    Answered on January 4, 2019.
    Add Comment

    Alternately try this code:

    [^a-zA-Z0-9 :]
    
    

    javascript example:

    "[email protected]#$%* ABC def:123".replace(/[^a-zA-Z0-9 :]/g, ".")
    
    

    Also refer this link http://jsfiddle.net/vhMy8/.

     

    Answered on January 4, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.