Need help with filtering text in a texbox


i have been head scratching on over hour, trying allow following text in textbox 

a- z -z 0 - 9 , ^


trying keep showing message box illegal characters 


  system.text.regularexpressions.regex regex = null;
                        regex = new system.text.regularexpressions.regex("^([a-za-z0-9-^])*$");
                        if (regex.ismatch(textbox1.text)) {
                       
                        }
                        else
                        {
                        xtramessagebox.show("there seems issue not allowed illegal characters", "error", messageboxbuttons.ok, messageboxicon.error);
                        } 

can seeing doing wrong ? guys. 

try expression:

   @"^([a-za-z0-9\^])*$"

and show example of text gives problem.



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

How to Share webservice object to all user

How to fix error Msg 1801, Level 16, State 3, Line 1