I want to remove characters other than alphabets from a string in XSLT. For example
O\'Niel = ONiel
Here's a 2.0 option:
EDIT: Sorry...the 1.0 requirement was added after I started on my answer.
XML
O'Niel
St Peter
A.David
XSLT 2.0
Output
ONiel
StPeter
ADavid
Here are a couple more ways of using replace()...
Using "i" (case-insensitive mode) flag:
replace(.,'[^A-Z]','','i')
Using category escapes:
replace(.,'\P{L}','')