Reputation: 10095
In my below mentioned reqular expression, how can i add double quotes ?
<asp:RegularExpressionValidator SetFocusOnError="true" ID="rev" runat="server"
Display="None" ValidationGroup="question" ErrorMessage="" ControlToValidate="txtQuestion"
ValidationExpression="^[0-9a-zA-Z-/'? ]+$"> </asp:RegularExpressionValidator>
Upvotes: 2
Views: 2368
Reputation: 711
I'm not sure exactly what you are asking but if you are asking how to add quotes to your regular expression I would point you to this cheat sheet.
Upvotes: 0
Reputation: 3727
Did you try
\"
Cause, it's encoded in HTML.
You have to keep in mind than ASP page are render in XHTML (like XML) and then you should encode regexp in order to have seems correct in XML.
Upvotes: 0
Reputation: 1500155
This sounds like it may be an XML question more than regex. Have you tried just using "
?
ValidationExpression="^[0-9a-zA-Z-/'?" ]+$">
Upvotes: 6