I'm looking for a regular expression that which will match a string ##test## in a text. The string can be surround by any word or nonword character, or white-space, or newline - so everything can be one the left and on the right of the string, no matter. I need to use it in a asp.net RegularExpressionValidator control for ValidationExpression.
Thanks in advance for help ! Regards.
<asp:RegularExpressionValidator ID="RegularExpressionValidator9" runat="server" ControlToValidate="TextBox1"
Display="Dynamic" ValidationGroup="Mail" ErrorMessage="Insert !"
ValidationExpression="(\w|\s|\n)##test##(\w|\s|\n)" >*</asp:RegularExpressionValidator>
<asp:Button ID="Button1" runat="server" Text="Button"
ValidationGroup="Mail" Onclick="Button1_Click" />