[osis-core] osisID Regex

Patrick Durusau osis-core@bibletechnologieswg.org
Sat, 07 Jun 2003 16:43:25 -0400


Guys,

Gee, I thought I would get home and find both regexes written and in my 
mail box! ;-) Bad rain all the way (both ways) but arrived and returned 
safely.

On the osisID regex:

As it stands now (broken up to show the sections:

1. (((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?:)?  letters/numbers,and underscore, separated by "." up to ":"

2. ((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?  optional letters, numbers, and underscore, separated by "."

I ASSUME at the end of this expression, the "!" plus other stuff syntax

3. ((\s(((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?:)? optional whitespace followed by letters, numbers, and underscore, 
                                                   separated by "." ending in ":"

4. ((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?)*)? optional letters, numbers, and underscore, separated by "."

So the extension mechanism needs to appear a the ends of lines 2 and 4.

Looks like it should be the separator syntax "!" followed by letters, numbers and underscore, separated by "." (using #3 as 
the template:

((!(((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?)?

So, the expression becomes:

1. (((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?:)?  letters/numbers,and underscore, separated by "." up to ":"

2. ((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?  optional letters, numbers, and underscore, separated by "."

New

3. ((!(((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?)? New extension of reference 

I ASSUME at the end of this expression, the "!" plus other stuff syntax

4. ((\s(((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?:)? optional whitespace followed by letters, numbers, and underscore, 
                                                   separated by "." ending in ":"

5. ((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?)*)? optional letters, numbers, and underscore, separated by "."

6. ((!(((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?)? New extension of reference 

Ugly I know but appears to validate. 

Got to run to the drugstore but will work on the time regex when I return.

Hope everyone is having a great day!

Patrick

-- 
Patrick Durusau
Director of Research and Development
Society of Biblical Literature
Patrick.Durusau@sbl-site.org
Co-Editor, ISO 13250, Topic Maps -- Reference Model

Topic Maps: Human, not artificial, intelligence at work!