Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2806

Re: Use of function "regex_replace"

$
0
0

Thanks Robin for your answers.

 

I see that, theorically, I can capture a part of the regular expression with parenthesis to use it as the replacement string:

 

( ... )

Capturing parentheses. Range of input that matched the parenthesized subexpression is available after the match.

 

As I see in the documentation, the <replacement string> is the 3rd one but I still can't find how to represent it to work, what to put at the left of the "2":

 

  • regex_replace($Word_In, '^([A-Z]+) ([A-Z]+) ([A-Z]+)$', '\2', null);

 

I've tried some symbols ("/2", "\2", "$2", ...) and it doesn't work. I think the documentation doesn't mention it...


Any idea to represent it?

 

Thanks in advance and best regards


Viewing all articles
Browse latest Browse all 2806

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>