[OPEN-ILS-DEV] Enabling Unicode support in regular expressions against patron names (registration form and search patron interface)
Dan Scott
denials at gmail.com
Fri May 29 16:51:58 EDT 2009
2009/5/29 Mike Rylander <mrylander at gmail.com>:
> 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.
Jason Etheridge also indicated via IRC that he was good with the
change, so I have commited this to trunk.
--
Dan Scott
Laurentian University
More information about the Open-ils-dev
mailing list