I tried to create a pattern to validate a text box. Seemed harmless
enough until i put an apostrophe in my equation! It didn't work, IP
said I had an inavlid expression.
Here's what I used: [\w\s ']*
And IP didn't like it!
I even tried to escape it: [\w\s \']*
but no! IP still did not like it.
If anyone has found a resolution to this problem, I would definiately
like to hear about it! I really need to filter a lot of chars -EXCEPT-
the apostrophe.
Thank you!
Matt
mag31 - 11 Apr 2005 09:43 GMT
Hi Matt,
Aposttrophes and Quotations are valid regular expression characters. My
guess is that Infopath won't like them because they will break xml
attributes, which use either ' or " to mark off the start and end of an
attribute.
The blog below has code solution (which is not ideal). Code is required as
Infopath treats escaped unicode/ascii character sequences as invalid:
http://blogs.msdn.com/infopath/archive/2004/6/16.aspx
Best Regards,
Mark Grant
Cambridge Convergence Limited
www.cambridgeconvergence.com
> I tried to create a pattern to validate a text box. Seemed harmless
> enough until i put an apostrophe in my equation! It didn't work, IP
[quoted text clipped - 12 lines]
> Thank you!
> Matt