On Tue, 2017-09-26 at 01:45 +0000, Mailing Lists Mail
daktapaal(_at_)gmail(_dot_)com wrote:
I also have another question..
I want to replace '[()''+\-*$=]' with the character + a #
replace( $str, '[()''+\-*$=]', '$0#')
?
$0 refers to the entire thing matched, or you can use capturing parens,
replace( $str, '([()''+\-*$=])', '$1#')
where $1 is the first thing inside (...), $2 would be the second (...)
group if there was one.
Regular expressions are incredibly powerful but be careful not to
overuse them or you'll never be able to understand what you wrote a
week later! :)
Liam
--
Liam Quin, W3C, http://www.w3.org/People/Quin/
Staff contact for Verifiable Claims WG, SVG WG, XQuery WG
Web slave for http://www.fromoldbooks.org/
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--