Regular Expressions do not function in InfoPath????

M

MatsonPP

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
 
M

mag31

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top