Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
565
Ultracomboeditor regex pattern
posted

Hi,

Could anyone help me out to find a solution for the below description?

 

I have a combo editor in my windows application and I want to find whether a word which is not supposed to be there is present. 

Note, this editor has already set as a mandatory one in the property tab with other regex and message. So i will have to use this again based on a condition for example, while saving the form. So, I will use something like this 

county = countyIdUltraCombo.Text.Replace(" ", "").ToString().ToUpper(); --> code to get the sting value by removing space in between

Once I get this string value, i will use it in a if condition to get into the loop and execute the below.


infragisticsErrorProvider1.SetRegexPattern(addressControl1.countyIdUltraCombo, "^(?!OFFLINE$|OFF LINE$|offline$|Offline$|oFFLINE$|oFF LINE$|Off Line$).+");
infragisticsErrorProvider1.SetRegexMessage(addressControl1.countyIdUltraCombo, "Offline is not valid");
infragisticsErrorProvider1.SetValidationEnabled(addressControl1.countyIdUltraCombo, true);

The issue is we can keep adding different arrangement of the word offline in order to make the regexpattern work, like one mentioned above. 

Kindly advise how to use this effectively so that all kinds of the word offline can be a pattern.

Thanks

Preeth

Parents
  • 565
    posted

    Coorection, I meant different arrangements of the word Offline.

    Examples are Offline, Off line,OFFLINE, OFF Line, OFF LINE, oFFLINE, Off Line, OFF L I N E, etc

Reply Children