Solved

View - Text Box Validation Pattern to exclude 1 special character?

  • 17 November 2017
  • 4 replies
  • 27 views

Userlevel 3
Badge +13

Hi,

 

Anyone know what Pattern can be used on a Text box to include everything EXCEPT the " special character?

Rather than build up the pattern to say which special characters can be used, is there a way to do the pattern to include everything except 1 special character?

 

Reason for this is that special character is breaking my workflows.

 

Thanks

icon

Best answer by Mustafa 17 November 2017, 20:25

Hi mate,



 



Try the expression below to strip 3 types of Quotes



"   U+0022 QUOTATION MARK

“ U+201C LEFT DOUBLE QUOTATION MARK

” U+201D RIGHT DOUBLE QUOTATION MARK
 


 



 



Pattern:



^[^"“”]*$


 



Expression:



 





 



If you want the expression just for one type of quotes "



 



Use this pattern:



 



^[^"]*$


Then modify the expression to replace only double quotation mark



 



Hope this helps

View original

4 replies

Userlevel 6
Badge +10

Hi mate,


 


Try the expression below to strip 3 types of Quotes


"   U+0022 QUOTATION MARK
“ U+201C LEFT DOUBLE QUOTATION MARK
” U+201D RIGHT DOUBLE QUOTATION MARK
 

 


 


Pattern:


^[^"“”]*$

 


Expression:


 



 


If you want the expression just for one type of quotes "


 


Use this pattern:


 


^[^"]*$

Then modify the expression to replace only double quotation mark


 


Hope this helps

Userlevel 3
Badge +13

Hi Mustafa,

 

Thanks for your reply, really appreciate it. -That is a great way of dealing with text if entered into a text box.

 

I wanted to deal with the text as it is being entered, using the Validation Pattern property for a text box.

So i entered ur pattern ^[^"]*$ into a New Pattern and applied it to the text box and it seems to work great. It allows every character except "

 

Have i done this right, is there anything else that needs adding to this pattern, or will this allow everything except " to be entered?

 

Thanks

Userlevel 6
Badge +10

Hi,


 


Yes, this should be enough to validate the string.


it allows all characters except "

Hi Mustafa, I tried doing this and the form does not save it keeps on rolling but don't save. I created the expression and added the expression to the text box.General Properties Expression. Please let me know what i am doing is wrong.

Reply