On 11/13/2012 02:52 PM, Marty Schoch wrote:
> The purpose of this block of code is to determine if the database name isValid database name or valid filename?
> The regular expression works as follows, first we defined a string
I worked out valid filename as this.
These characters that are not in the original are also valid filename
> LEGAL_CHARACTERS = "abcdefghijklmnopqrstuvwxyz0123456789_$()+-/";
> Then the regular expression is evaluated as:
> Pattern.matches("^" + LEGAL_CHARACTERS, name)
> By prefixing the LEGAL_CHARACTERS string with "^" we are saying match any
> The remaining checks are for null, empty string, and also ensuring that the
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.