Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2006, 06:36 AM
Authorized User
 
Join Date: Oct 2005
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default regex for stripping space

i want to strip the spaces on the sides of these characters:
; ! ? : << >> (german quotes).
i can do it with the long replace(replace(replace .... and so on.
but i want it to make it with one. can you suggest something? thanks.

 
Old February 7th, 2006, 07:46 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

To get you started, you can remove any spaces that follow a ?, !, or ; using

replace($in, '([?!;])\s+', '$1')

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old February 8th, 2006, 06:29 AM
Authorized User
 
Join Date: Oct 2005
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok thanks. =D






Similar Threads
Thread Thread Starter Forum Replies Last Post
Stripping CRLF?? crabjoe Classic ASP Basics 7 February 26th, 2008 05:58 PM
Stripping last X characters fixxer XSLT 2 September 21st, 2007 05:11 PM
Stripping hyphens arholly Access 2 January 4th, 2007 09:16 AM
Stripping out extra space around an italic word simone_s XSLT 2 April 25th, 2006 03:50 AM
Stripping down variable values mellan XSLT 1 September 19th, 2005 09:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.