From 36f8481e4029ce04776e222653ab3e5aff0c9cd7 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 26 Sep 2016 06:53:30 -0700 Subject: doc: new regsub example. * txr.1: Left-anchored match in regsub with r^. --- txr.1 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 87841e16..738eca10 100644 --- a/txr.1 +++ b/txr.1 @@ -32101,6 +32101,9 @@ which indicates that no replacement is to take place. ;; Replace Hello with Goodbye: (regsub #/Hello/ "Goodbye" "Hello world!") -> "Goodbye world!" + + ;; Left-anchored replacement with r^ function: + (regsub (op r^ #/H/) "J" "Hello, hello!") -> "Jello, hello!" .cble .coNP Function @ regexp -- cgit v1.2.3