From: bsquared <bwcod...@gmail.com>
Date: Tue, 13 Nov 2012 17:58:45 -0800
Local: Tues, Nov 13 2012 8:58 pm
Subject: Re: TouchDB-Android - Help to understand TDServer.pathForName
On 11/13/2012 02:52 PM, Marty Schoch wrote:
> The purpose of this block of code is to determine if the database name is
Valid database name or valid filename?
> valid. > 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
> marty
Regards, Brian 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.
| ||||||||||||||