[za-pm] Text::Format

Anne Wainwright anotheranne at fables.co.za
Thu Aug 30 00:56:21 PDT 2012


Hi, Sean

Thanks for the input. I dwill look at a few variations on the theme
this evening.

I assumed that the Text::Format would take care of the whitespace and
that we need only specify the two words that we are not going to break.

Note that \s is whitespace, \S is non-whitespace, ie it includes any
letters and puntuation which is why, I assumed, that it was used in the
example regex. A bit of a catchall, standing for 'Jones' in this
example.

Any way you are not commenting on my hash construction which is good
news. I'll keep the group posted,

Anne



On Thu, Aug 30, 2012 at 07:27:31AM +0200, Sean Carte wrote:
> Note: Beware! Default reply-to is to the list.
> 
> 
> On 29 August 2012 21:53, Anne Wainwright <anotheranne at fables.co.za> wrote:
> >                {'^Mrs?\.
> > => '^\S+,'^\S+ => '^(?:S|J)r\.}
> >
> >            don't break names such as Mr. Jones, Mrs. Jones, Jones Jr.
> 
> >
> > So I have the following to get my regex into a hash:
> >
> >     my  %regx = ('^isbn=>'^[0-9]{9,13}X?);  # my regex
> 
> Not that I know anything about this, but, given the example above,
> shouldn't your regex be more like:
> 
> '^isbn=>'^\S+[0-9]{9,13}X?
> 
> That is, including the whitespace?
> 
> Sean
> -- 
> Sean Carte
> DUT E-Repository Administrator
> +27 72 898 8775
> +27 31 373 2490
> fax: 0866741254
> ir.dut.ac.za
> _______________________________________________
> Za-pm mailing list
> Za-pm at pm.org
> http://mail.pm.org/mailman/listinfo/za-pm
> 
> posts also archived on Mail Archive
> http://www.mail-archive.com/za-pm@pm.org/


More information about the Za-pm mailing list