RE: [xsl] xslt regex escaping

Subject: RE: [xsl] xslt regex escaping
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Tue, 17 Aug 2004 11:52:50 +0000
Hi David,

I don't know much about escaping regular expressions in XSLT2, but depending on whether you have single or multiple lines and how you manage them, you may have problems on your evaluations perhaps being too greedy.

That is, the first expression might take all text untill the last "]" in the input, leaving "Windows Metafile Library" for the second expression.

But this is perhaps not your problem?

Regards,
Ragulf Pickaxe :-)



Given a source of


components['kdemultimedia'] = "Multimedia applications for the K Desktop
Environment (KDE).";
components['m4'] = "The GNU macro processor.";
components['hwcrypto'] = "Hardware cryptographic accelerator support.";
components['doxygen'] = "A documentation system for C/C++.";
components['aspell-de'] = "German dictionaries for Aspell.";
components['perl-XML-Encoding'] = "A module for parsing encoded map XML
files.";
components['automake'] = "A GNU tool for automatically creating Makefiles.";
components['binutils'] = "A GNU collection of binary utilities.";
components['startup-notification'] = "Library for tracking application
startup";
components['libwmf'] = "Windows Metafile Library";


I'm looking for a regex to pick out
kdemultimedia and
Multimedia applications for the K Desktop Environment (KDE).

I.e the string after
 components\['(.*)'\] = \"(.*)\"

and I'm having trouble with the escaping.

Question. Is it possible to escape both quotes  (single and double)
in a analyze-string regex attribute?

I realise I can work round it;
Just wondering if the attribute quoting is getting in the way too much?





Regards DaveP.

**** snip here *****

--
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is
confidential and may be privileged. If you are not the intended
recipient you should not use, disclose, distribute or copy any of the
content of it or of any attachment; you are requested to notify the
sender immediately of your receipt of the email and then to delete it
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants. However, it
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus


Current Thread