forum

home / developersection / forums / regular expression pattern issue

Regular Expression pattern issue

Manoj Bhatt 2734 27-Dec-2013

I want to delete all the characters other than letter and number from a given string. I used the pattern below but it still returns string without any change.

Regex rex = new Regex("/[^a-zA-Z0-9]+/");

Response.Write(rex.Replace("asd123!-<>@;',.", ""));

It suppose to return "asd123"

Regex patterns are like alien language to me and I dont know how to fix this.

Thanks


c# c# 
Updated on 27-Dec-2013
Manoj Bhatt

Other


Message
Can you answer this question?

Answer

1 Answers

Liked By