Re: Regex replacements (\1, \2) not matching

2018-11-12 Thread panagiotis merakos via use-livecode
Hello all, There is an enhancement request about it: https://quality.livecode.com/show_bug.cgi?id=21534 Best regards, Panos -- On Mon, Nov 12, 2018 at 10:21 AM Kaveh Bazargan via use-livecode < use-livecode@lists.runrev.com> wrote: > Thanks James > > I am using the community edition of LiveCod

Re: Regex replacements (\1, \2) not matching

2018-11-12 Thread Kaveh Bazargan via use-livecode
Thanks James I am using the community edition of LiveCode, but I remember that Thierry has been v helpful in the past. I just found a similar question I asked 4 years ago and he put lots of time in explaining: https://forums.livecode.com/viewtopic.php?t=21157 I will review that because I have a

Re: Regex replacements (\1, \2) not matching

2018-11-11 Thread James Hale via use-livecode
You can do quite a lot with LC's chunk expressions as well as with the matchtext and matchchunk functions. If you are willing to put a bit of time using these functions and arrays you can pretty much make up for LC's shortcomings in this area. If you have an Indy or Business license of LC the

Re: Regex replacements (\1, \2) not matching

2018-11-11 Thread Kaveh Bazargan via use-livecode
Thank you both for your comments. My jaw dropped that I had not noticed that before!! I need to do a lot of text manipulation, so hopefully I can do that with LiveCode's friendly and powerful text chunk features. On Sun, 11 Nov 2018 at 14:22, Sean Cole (Pi) via use-livecode < use-livecode@lists.ru

Re: Regex replacements (\1, \2) not matching

2018-11-11 Thread Sean Cole (Pi) via use-livecode
Hey Kaveh, To break down your request you are searching if the string "one two" matches the pattern "(.+) (.+)" which it does as there are two word with a space between that can have at least 2 characters per word (. = any character, + = and extra character of that type, in this case 'any'). As it

Re: Regex replacements (\1, \2) not matching

2018-11-11 Thread James At The Hale via use-livecode
Kaveh, You are not missing anything. LC’s implementation of REGEX is. It can’t use back referencing in replacement strings. > What am I missing? I put in message box: > put replacetext("one two", "(.+) (.+)", "\2 \1") > I get result: > "\2 \1" > rather than: > "two one" James __

Regex replacements (\1, \2) not matching

2018-11-11 Thread Kaveh Bazargan via use-livecode
What am I missing? I put in message box: put replacetext("one two", "(.+) (.+)", "\2 \1") I get result: "\2 \1" rather than: "two one" -- Kaveh Bazargan Director River Valley Technologies • Twitter • LinkedIn