Hello Michael,

I've just tried following lines.

public class Test {
   public static void main(String[] args) {
        String foo = ",";
        if (foo.matches("[<>a-zA-Z,öäüÖÄÜß0-9\\.\"\'?!§$%&\\-+*:/ ]+")){
                System.out.println(":)");
        } else {
                System.out.println(":(");
        }
  }
}

With the aim to decide weather String foo contains a ',' ( or  another blabla 
that I allow) or not. Fortunately that works fine :). Now I want the same 
functionality in T5.

Thomas

>>> Michael Courcy <[EMAIL PROTECTED]> schrieb am Mo, Jan 14, 2008 um  1:33 
in Nachricht <[EMAIL PROTECTED]>:
> Did you try this regexp with in a regular java program ?
> 
> Thomas Zenglein a écrit :
>> Hello everybody,
>>
>> I want my textfield to allow a couple of signs.  For that I have the 
> following code.
>>
>> @Validate("required,regexp=[<>a-zA-ZöäüÖÄÜß0-9\\.\"\'?!§$%&\\-+*:/ ]+")
>> public void setName(String name) {
>>      this.name = name;
>> }
>>
>> Comma signs should also be allowed here. So I want to extend the regexp to 
> handle that case.
>>
>> @Validate("required,regexp=[<>a-zA-Z,öäüÖÄÜß0-9\\.\"\'?!§$%&\\-+*:/ ]+")
>> leads to 
>> Coercion of [<>a-zA-Z to type java.util.regex.Pattern (via String --> 
> java.util.regex.Pattern) failed: Unclosed character class near index 8 
> [<>a-zA-Z ^
>>
>> @Validate("required,regexp=[<>a-z\\,A-ZöäüÖÄÜß0-9\\.\"\'?!§$%&\\-+*:/ ]+") 
> leads to following error:
>> Coercion of [<>a-z\ to type java.util.regex.Pattern (via String --> 
> java.util.regex.Pattern) failed: Unclosed character class near index 7 
> [<>a-z\ 
> ^
>>
>> Has anybody an idea for the correct code??? I use tapestry 5.0.6.
>>
>> THX 
>>
>> Thomas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED] 
>> For additional commands, e-mail: [EMAIL PROTECTED] 
>>
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to