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 August 28th, 2009, 06:56 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 119
Thanks: 25
Thanked 3 Times in 3 Posts
Default

Thank you Mike.

I knew it was a regex problem

Regards,

John.
 
Old August 28th, 2009, 11:03 AM
Registered User
 
Join Date: May 2009
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Michael,

I am sorry to say that your suggest regex expression gives the following error:

>> [Saxon-B 9.1.0.7] The regular expression in replace() must not be one that matches a zero-length string
 
Old August 28th, 2009, 11:08 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Change one of the '*' for a '+', e.g.:

replace($in, '.*?(aaabbcc.{3,7}dddeeefff.{2,4}xxxyyyzzz)+(.*)', '$2')

You will also need to make sure you have the correct number of 'x', 'y' and 'z's because you original examples do not work (two x's in the string, three in the pattern).
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 
Old August 28th, 2009, 11:10 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

>I am sorry to say that your suggest regex expression

Then fix it.

If you find code from me in an answer, it's not intended as a working solution, it's there to suggest a way forward.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old August 28th, 2009, 11:17 AM
Registered User
 
Join Date: May 2009
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Sam,

Thank you for both insights.

Michael,

Thank you for the suggestion on the way forward (I an new to this sight and was unaware of the conventions).





Similar Threads
Thread Thread Starter Forum Replies Last Post
Find Matching pattern in Given String sanjivbshinde ASP.NET 2.0 Professional 3 October 10th, 2008 06:32 PM
how to find a string in another string in vb6 satish_k VB How-To 3 March 30th, 2007 12:17 PM
Find String in query vishwadh SQL Server ASP 3 September 6th, 2006 03:16 AM
syntax to find a string in a string cole SQL Server 2000 2 October 10th, 2005 06:06 PM
JSP string find characters ndanger J2EE 2 November 24th, 2004 09:52 AM





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