[OPEN-ILS-DEV] Enabling Unicode support in regular expressions against patron names (registration form and search patron interface)

Mike Rylander mrylander at gmail.com
Fri May 29 15:16:01 EDT 2009


On Fri, May 29, 2009 at 3:07 PM, Dan Scott <denials at gmail.com> wrote:
> Hey all:
>

[snip]

> So, how about:
>
> const nonumRegex        = /^[^\d\s]+[\d]*$/; /* no numbers, no beginning whitespace */
>
> and:
>
> value = value.replace(/^[\d\s]+/g,'').replace(/[\d\s]+$/g,'');
>
> I think this achieves the same goals (at least, as described in the
> comments in ue_config.js) in a Unicode-friendly way. I have tested the
> regexes and they work.
>

Cool by me.

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list