primefaces keyfilter regular expression
11:06 12 Feb 2013

I got a problem regarding to the keyfilter from primefaces extension. I want to define a regular expression for a time period for example "P1Y3M2W1d". The following regular expression for the key filter is used:


The goal is that user might only type in P first then digit number 0-9, afterwards Y(year), M(Month) or W(Week) and so on. The problem is I can only type in captial P and nothing else. I check the regular expression. It is correct. What is the problem with regular expression in keyFilter? Thanks for help!!!

Update:


   

I think primefaces extension uses the jquery keyfilter plugin. The regEx should be quoted around "//", but somehow the only possibility in my UI is to captial P

regex primefaces keyfilter