From: Ben Morrow on 11 Jul 2010 07:16 Quoth Tad McClellan <tadmc(a)seesig.invalid>: > > So then, > > s/\bMc([a-z])/Mc\U$1/; > or > s/(?<=\bMc)([a-z])/\U$1/; > > > Good luck getting MacArthur from Macarthur without also getting > MacHine from Machine... s/(?<=\bMac)(?!h)([a-z])/\U$1/; obviously... Ben
From: sln on 11 Jul 2010 13:09 On Sun, 11 Jul 2010 12:16:41 +0100, Ben Morrow <ben(a)morrow.me.uk> wrote: > >Quoth Tad McClellan <tadmc(a)seesig.invalid>: >> >> So then, >> >> s/\bMc([a-z])/Mc\U$1/; >> or >> s/(?<=\bMc)([a-z])/\U$1/; >> >> >> Good luck getting MacArthur from Macarthur without also getting >> MacHine from Machine... > > s/(?<=\bMac)(?!h)([a-z])/\U$1/; > >obviously... > ?? What about Machenderson ?? I think Mc... is a little easier to "divine" than Mac... Either way, a list of valid names would have to be used. The point is moot. -sln
From: John on 11 Jul 2010 17:55 <sln(a)netherlands.com> wrote in message news:5guj36tasi2a2v7oi4djr6msoi6aa0j34t(a)4ax.com... > On Sun, 11 Jul 2010 12:16:41 +0100, Ben Morrow <ben(a)morrow.me.uk> wrote: > >> >>Quoth Tad McClellan <tadmc(a)seesig.invalid>: >>> >>> So then, >>> >>> s/\bMc([a-z])/Mc\U$1/; >>> or >>> s/(?<=\bMc)([a-z])/\U$1/; >>> >>> >>> Good luck getting MacArthur from Macarthur without also getting >>> MacHine from Machine... >> >> s/(?<=\bMac)(?!h)([a-z])/\U$1/; >> >>obviously... >> > ?? What about Machenderson ?? > I think Mc... is a little easier to "divine" than Mac... > Either way, a list of valid names would have to be used. > The point is moot. > > -sln Hi I just check for the following afterwards: Mach Machete Machine Machinable Mackerel Macro Mace Macerate Macula otherwise the replacement will be OK. As you say, Mc, is easier. Regards John
From: Tad McClellan on 11 Jul 2010 21:33 John <john1949(a)yahoo.com> wrote: > ><sln(a)netherlands.com> wrote in message > news:5guj36tasi2a2v7oi4djr6msoi6aa0j34t(a)4ax.com... >> On Sun, 11 Jul 2010 12:16:41 +0100, Ben Morrow <ben(a)morrow.me.uk> wrote: >>>Quoth Tad McClellan <tadmc(a)seesig.invalid>: >>>> >>>> So then, >>>> >>>> s/\bMc([a-z])/Mc\U$1/; >>>> or >>>> s/(?<=\bMc)([a-z])/\U$1/; >>>> >>>> >>>> Good luck getting MacArthur from Macarthur without also getting >>>> MacHine from Machine... >>> >>> s/(?<=\bMac)(?!h)([a-z])/\U$1/; >>> >>>obviously... >>> >> ?? What about Machenderson ?? >> I think Mc... is a little easier to "divine" than Mac... >> Either way, a list of valid names would have to be used. >> The point is moot. >> >> -sln > > Hi > > I just check for the following afterwards: > > Mach Machete Machine Machinable Mackerel Macro Mace Macerate Macula There are 251 names that start with MAC at http://names.mongabay.com/surnames_M.htm A fair number of them should not be changed as you suggest.. MacHiavelli, MacIna, MacK, MacOmb etc... > otherwise the replacement will be OK. OK with you maybe, but almost for sure not OK with the person whose name you mangle. [1] [1] I often get snail mail addressed to Mr. Clellan, I assume because there's only a few pixels difference between "c" and "r" which confused an OCR program somewhere... -- Tad McClellan email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/" The above message is a Usenet post. I don't recall having given anyone permission to use it on a Web site.
From: John on 12 Jul 2010 03:35 "Tad McClellan" <tadmc(a)seesig.invalid> wrote in message news:slrni3ks14.4h0.tadmc(a)tadbox.sbcglobal.net... > John <john1949(a)yahoo.com> wrote: >> >><sln(a)netherlands.com> wrote in message >> news:5guj36tasi2a2v7oi4djr6msoi6aa0j34t(a)4ax.com... >>> On Sun, 11 Jul 2010 12:16:41 +0100, Ben Morrow <ben(a)morrow.me.uk> wrote: >>>>Quoth Tad McClellan <tadmc(a)seesig.invalid>: >>>>> >>>>> So then, >>>>> >>>>> s/\bMc([a-z])/Mc\U$1/; >>>>> or >>>>> s/(?<=\bMc)([a-z])/\U$1/; >>>>> >>>>> >>>>> Good luck getting MacArthur from Macarthur without also getting >>>>> MacHine from Machine... >>>> >>>> s/(?<=\bMac)(?!h)([a-z])/\U$1/; >>>> >>>>obviously... >>>> >>> ?? What about Machenderson ?? >>> I think Mc... is a little easier to "divine" than Mac... >>> Either way, a list of valid names would have to be used. >>> The point is moot. >>> >>> -sln >> >> Hi >> >> I just check for the following afterwards: >> >> Mach Machete Machine Machinable Mackerel Macro Mace Macerate Macula > > > There are 251 names that start with MAC at > > http://names.mongabay.com/surnames_M.htm > > A fair number of them should not be changed as you suggest.. > > MacHiavelli, MacIna, MacK, MacOmb etc... > > >> otherwise the replacement will be OK. > > > OK with you maybe, but almost for sure not OK with the person > whose name you mangle. [1] > > > > > > [1] I often get snail mail addressed to Mr. Clellan, I assume > because there's only a few pixels difference between "c" > and "r" which confused an OCR program somewhere... > > -- > Tad McClellan > email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/" > The above message is a Usenet post. > I don't recall having given anyone permission to use it on a Web site. There is a nice routine on Andy Kramek's blog. Google "Andy Kramek checkscots". I dare say some names will be mangled. Macey is the obvious one. Give it to a first year student as an exercise is probably the best approach. Regards John
First
|
Prev
|
Pages: 1 2 Prev: FAQ 4.25 How do I expand tabs in a string? Next: FAQ 9.17 How do I check a valid mail address? |