GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
PossessiveProperNoun


https://support.genopro.com/Topic21610.aspx
Print Topic | Close Window

By Nand - Wednesday, May 7, 2008
The rule I'm trying to define is as follows: If the last character is an "s", "x" or "z" then use the value as is else append an "s".  E.g., Alice should become Alices, like in "Alices vader" and Charles should remain unchanged like in "Charles vader".

The original (EN) code is: <PossessiveProperNoun T="(s$)=$1'Sad.$)=$1's:" /> which returns Alices and Charles'.  But I wanted to get rid of the terminating apostroph.

I've tried following combinations but they don't deliver the expected result.

T="([sxz]$)=$1Sad[^sxz])=$1s:"               returns Aslice and Csharles
T="([sxz]$)=$1Sad.$)=$1s:"                      returns Alices (OK)  and Charless
T="(s$)=$1Sadx$)=$1Sadz$)=$1Sad.$)=$1s:" returns Alices (OK)  and Charless

Can anybody tell me what I'm doing wrong?

PS: I was unable to use script56.chm as documented but found information at http://msdn.microsoft.com/en-us/library/6wzad2b2.aspx

By jcguasp - Thursday, May 8, 2008
Try:

<PossessiveProperNoun T="([^ sxz]$)=$1s:" />

This code means: if not (the '^') ending (the '$') with s, x or z, append an 's' at the end.

I tried it with my tree and it looks OK.

JC

Update: the script56.chm file can be downloaded at MS:

http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en

By Nand - Thursday, May 8, 2008
Thanks JC,  your suggestion works.

Turns out that I forgot the "$" after "[^sxz]".  That's the sort of error you don't see when you wrote it yourself.