Re: Stripping XML declaration
Josh Narins <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.petal |
|---|---|
| Message-ID | <[email protected]> |
> Hi Josh, > > Please reply to the list in the future. Sorry about that, I'm pretty new to mutt. I'm on some other mailing lists, but this is the first one I've replied to :) > > > It would be > > $processed =~ s#^ \s* <\?xml version="1.0"\?> \s* ##xs; > > #s to treat as single string > > #x to allow readability whitespace in the left hand side > > Thanks for the regex. Did that work for you? That didn't work, but this did... s#^\s*<\?xml version="1\.0"\?>\s*##s; I think I was missing an explicit whitespace indication between xml and version in the first one. > > I would definitely not recommend any sort of XML parser for this single > > change, esp. since is defined as occuring at the beginning of the document. > > I'd agree. I was just making suggestions. I prefer to look at all > possible solutions and avoid premature optimization. > > > Regards, > William > > -- > Knowmad Services Inc. > http://www.knowmad.com -- xplanet -body earth -transpng a.png -geometry "300x300-0+0" -origin sun My politics : http://satp.blogspot.com Perl Programmer
signature.asc
(application/pgp-signature, 232 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQFB5aVsqmX4LWzvJuARAmn6AJ9sNYNd+nA+E1L4SVSgYTH6taapmwCgiXCb dWDi8m05zxMZhO2w8m0pUfI= =6Zje -----END PGP SIGNATURE-----