|more useful options|
Can this be parsed ?by ChOas (Curate)
|on Jul 11, 2002 at 05:55 UTC||Need Help??|
ChOas has asked for the
wisdom of the Perl Monks concerning the following question:
A collegue of mine is working on parsing a file, which
is part of a database... The person that wrote this
database has kinda screwed up, because he/she used 1 field
for 3 values, I`ll explain:
In The Netherlands, a surname CAN be prepended by (amongst
others) one of the following:
'VAN DER','VAN DE','DEN','DE','VAN' ...
I have no clue what this is called in English, but
I would like to call it a 'prependition' :)
Anyways... The fields in every line are:
NAME<Mandatory> PREPENDITION<maybe> HAVENT_GOT_A_CLUE<maybe>
I wanted to help, and I`ve tried different ways to parse
this, and I only have a little sample data, but I came up
It works for my sample data, but I can already think of
cases where it won`t work... and... I have a gut-feeling
this can be done better (I`m not a regex-wiz) ...
Any pointers ?
print "profeth still\n" if /bird|devil/;