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

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'