[osis-users] osisRef Grains

Weston Ruter westonruter at gmail.com
Sat Jun 19 00:49:10 MST 2010


Can someone explain this regular expression for the osisRef grains?

(@(cp\[(\p{Nd})*\]|s\[(\p{L}|\p{N})+\](\[(\p{N})+\])?))?

The OSIS manual says that a grain is in the form of:

grainType(parameters)
>

And provides the example:

Matt.1.1 at cp(3)-Matt.1.1 at cp(12)
>

But elsewhere the format is shown to be:

Gen.1.1 at cp[8]
>

I'm assuming that the parentheses are wrong, and the square brackets are
right.

Furthermore, looking at the cp grain: cp\[(\p{Nd})*\]

Why does it allow zero or more digits to be supplied as the parameter and
not one or more? i.e. cp\[(\p{Nd})+\]. Otherwise I could do John.3 at cp[] and
I don't think that should be allowed.

Now for the s grain: s\[(\p{L}|\p{N})+\](\[(\p{N})+\])?

I can see that that it is similar to cp, but that the parameter can be not
just a decimal digit but any unicode number or letter. What I don't get is
what comes after this, namely: (\[(\p{N})+\])? What's with this secondary
square-bracket-enclosed Unicode number? The s grain regular expression would
allow something like this: s[John][12], but there's no example of this in
the manual. Is this supposed to mean that it would select the 12th instance
of "John"?

Thanks!
Weston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/osis-users/attachments/20100619/914325f4/attachment.html>


More information about the osis-users mailing list