in reply to Re^5: regex to return line with name but not if it has a number
in thread regex to return line with name but not if it has a number

What is "a name"?

Would the following be names?

d'Artagnan O'Reilly 't Hooft de Figuera van der Vaart

Replies are listed 'Best First'.
Re^7: regex to return line with name but not if it has a number
by afoken (Chancellor) on Apr 03, 2017 at 18:58 UTC

      Handling names in computers just sucks. Stuffing them into separate database fields sucks even more.

      afoken++. And since nobody appears to have linked to it yet, here's a great list of falsehoods programmers believe about names -- quite a few eye-openers on there.

        Thanks for the link, AppleFritter++, I've finally bookmarked it.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^7: regex to return line with name but not if it has a number
by Anonymous Monk on Apr 03, 2017 at 17:56 UTC

    In my case my names are FistName LastName so your names above are correct but they would be first name last name combinations like: - Pat O'Reilly - Tony Smith - Jane de Figuera

      But your current regular expression does not allow for a leading ' or for multiple parts of the last name, delimited by whitespace.

      Maybe you can write a short, self-contained program that shows what regular expression you are currently using, and how, and also has some input data that you want to match and some input data that you want to reject.

      As I've tried to hint with my examples, names are much more complicated than your current approach allows, so I guess the best approach is to allow almost anything as a name.

        Thanks for your help and I get your comment re the name regex, it's ceratinly a trick one.Here's an example file and some example code:

        - 51 Laboratory Director Jobs in Redwood City, CA | › Jobs › Labor +atory Director Jobs Apply to 51 Laboratory Director jobs in Redwood C +ity, CA on . ... Apex Life Sciences; formerly known as Lab Support (2 +) BioReference Laboratories (2) - Laboratory Director Relocate to Los Angeles Job at ... /jobs/view +/250533025 We are looking for a Lab Director to lead our growing team +, ... Director, CLIA Lab Illumina Redwood City, CA, US. Posted 15 day +s ago. Sponsored. Laboratory Technician - 32 Director Laboratory Operations Jobs | › Jobs 32 Director Labo +ratory Operations jobs in United States on . ... and foster a high .. +. GCP and CLIA laboratory. Director of Lab Operations - CRO. We are . +.. - 21 Associate Director Operations Jobs in San Mateo, CA ... › Jobs + › Associate Director Operations Jobs Foster City, CA, US. Our worldw +ide ... Minimum of 5 years managerial experience in a CLIA lab enviro +nment and strong ... The Associate Director of Clinical Operations .. +. - 321 Laboratory Operations Jobs in San Francisco, CA | › Jobs › L +aboratory Operations Jobs Minimum of 5 years managerial experience in + a CLIA lab environment and strong leadership skills to ... Associate + Technical Director ... based in Foster City , CA … - John Smith| Clinical Lab Operations Director at … · - 43 Laboratory Manager Jobs in Menlo Park, CA | › Jobs › Laborato +ry Manager Jobs Director; Executive; ... role in the overall running +and safety of the laboratory and is responsible for managing the dail +y operations of the lab. ... Foster City, CA ... - Joe Bubba | /Affairs and Quality … · - 169 Clinical Laboratory Scientist Jobs in California ... › Jobs › + Clinical Laboratory Scientist Jobs Culver City, California (1) Monte +rey, California (1) West Sacramento, California (1) Company. Clinical + Management Consultants (28) University of California, San ... - David W. Anderson | /in/david-w-anderson-29b58326 View David W. +Anderson’s professional profile on . ... In-licensed & in +tegrated 2 products into CLIA lab ... •Provide leadership to f +oster team vision ... - Related Searches for "CLIA Lab Director Foster City" site:wâ&#128 +;¦ clia lab director course - Related searches clia lab director course

        code below:

        use strict; use warnings; use IO::Handle; use File::Basename; use File::Find; use File::Copy; my $fh; my $fh2; my $jj; my $file; my $line; print "I'm in trim\n"; print "curent working directory is $ENV{PWD}, \n"; open ($fh, ">", "output2.txt") or die "$!"; print $fh ""; close $fh; chdir "../Html3"; print "curent working directory is $ENV{PWD}, \n"; my @files2 = grep { -f } glob("*.txt"); foreach $file (@files2) { open (FILE, "$file"); while($line= <FILE> ){ open ($fh2, ">>", "output2.txt") or die "$!"; if ($line =~ m/^[A-Z]'?[- a-zA-Z]+$/) {print $fh2 "$line";} if ($line =~ m/^[A-Z]'?[- a-zA-Z]+$/) {print "$line";} } close FILE; } die;

        Right now I'm thinking the best strategy if to match the leading hyphen and the name to extract the line but I can't figure that regex out, I just have the basic name matching on in there now. Thanks in advance for the assistance.

      Don't forget hyphenated names: Vivian Smith-Smythe-Smith. (Update: Also, a generational designation suffix like III or IV may be written as 3rd or 4th, although this seems rare today.)


      Give a man a fish:  <%-{-{-{-<