Re: Generic file name validation code?
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Sun, 02 Sep 2007 10:14:08 -0400
harryajh wrote:
On 2 Sep, 12:40, Roedy Green <see_webs...@xxxxxxxxxxxxxxxxxxxx> wrote:> Pattern p = Pattern.compile("([A-Z]|[a-z]|[0-9])+.con");On Sun, 02 Sep 2007 11:15:34 GMT, "harry" <a...@xxxxxxx> wrote, quoted or
indirectly quoted someone who said :
Does anybody know of java code that does this?If you limited the name to A-Z a-z 0-9 . it would work on anything
without a tight length limit anything.
Thanks Roedy, this seems to do the job (forgot to say file name must
end with "con")
That can be abbreviated to:
Pattern p = Pattern.compile("([A-Za-z0-9])+.con");
Arne
.
- Follow-Ups:
- Re: Generic file name validation code?
- From: Eric Sosman
- Re: Generic file name validation code?
- References:
- Generic file name validation code?
- From: harry
- Re: Generic file name validation code?
- From: Roedy Green
- Re: Generic file name validation code?
- From: harryajh
- Generic file name validation code?
- Prev by Date: New to advane java help me in Java beans!
- Next by Date: Reverse engineer class diagram
- Previous by thread: Re: Generic file name validation code?
- Next by thread: Re: Generic file name validation code?
- Index(es):