First time creating pattern subroutine expressions
My data has words like
MENS HOUSE
MEN'S HOUSE
I would like to create an expression in the Apostrophes SUBROUTINE that would handle words ending with 'S and replace with just S e.g. MENS
Thanking you all in advance
creating a pattern expression for words ending 's
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I'm unable to check at the moment, but isn't there an apostrophes subroutine in the xxNAME rule sets that you could adapt?
Otherwise, use a conditional pattern to identify a token that ends in "'S" and replace that part of the pattern with "S". Something like
Otherwise, use a conditional pattern to identify a token that ends in "'S" and replace that part of the pattern with "S". Something like
Code: Select all
* | ' | S
COPY [1] temp
CONCAT [3] temp
RETYPE [2] 0
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.