I am trying to concieve the regex machine that e.g an 'å' is a letter
I am processing reference lists to make all references i a common form. I have got them stored in postgres, but I need to tear apart the Author fields to make them on the same form for all references, i.e. they may be written as:
Larry Wall, Tom Christensen & Jon Orwant or
Wall, L., Christensen, T. and Orwant J. or
L. Wall, T. Christensen & J. Orwant etc.
I am using Parse::RecDescent to do this, and a part of this is an regex picking out the names which preferably should have been:
/[[upper:]][[:lower:]]+/
( presently disregarding a few problems such as double names, Mac... names etc)
This works fine for some names, but then names like Ås, Lönsjö, Magnússon and so on starts to mess things up... My present name match is :
/[A-ZÆØÅ][a-zæøåäöüúáóé]+/
which does not look nice...
I have tried use utf8; but I causes a lot of Malformed UTF-8 character (unexpected non-continuation byte 0xd8, immediately after start byte 0xc6) in index at /opt/perl5/lib/site_perl/5.8.0/Parse/RecDescent.pm line 2979.
I have looked into use locale; but have so far not understood what I should do to tell the regex machine to have a wider understanding of charsets than just plain ascii. Mysjkin
In reply to Charset tornment by Mysjkin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |