Re: regex backreferences

2022-01-14 Thread Kaveh via use-livecode
Hi all

I emailed Thierry on 23 Dec and I have had no response. It looks like his last
post
<https://forums.livecode.com/viewtopic.php?f=9=36139=207519#p207519> on
the Forum was in July 2021.

His software for backreferences <https://sunny-tdz.com/livecode/sunnyrex> works
beautifully. It is closed source and commercial. I purchased it and used it
successfully. He also provided good support.

Precisely because I could not have my stacks dependent on proprietary
software, I stopped using his sunnYrex program and started implementing
backreferences myself. it is not an easy task and I even wonder if an
efficient method is possible using LiveCode scripting.

But I have made a start and if anyone is interested I am happy to
collaborate.

The ideal would be if LiveCode could implement this. The feature request
ticket is here <https://quality.livecode.com/show_bug.cgi?id=21534>.

Regards
Kaveh

On Wed, 15 Dec 2021 at 16:40, Kaveh 
wrote:

> It's two years since I have been in contact, but this is the email I had:
>
> th.do...@sunny-tdz.com
>
> Regards
> Kaveh
>
> On Wed, 15 Dec 2021 at 16:37, Douglas A. Ruisaard via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> None of the links to acquire nor contact Thierry on his site (<
>> https://sunny-tdz.com/livecode/sunnyrex>) work.  They just hang
>> indefinitely... but the web site, itself, appears to be functrional.
>>
>> Can anyone provide an alternative means to contact this developer?
>>
>> Douglas Ruisaard
>>
>> Trilogy Software
>>   (250) 573-3935
>>
>> -Original Message-
>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
>> Behalf Of Devin Asay via use-livecode
>> Sent: Wednesday, December 15, 2021 7:54 AM
>> To: How to use LiveCode
>> Cc: Devin Asay
>> Subject: Re: regex backreferences
>>
>> Thanks for confirming, Jacque and Kaveh. I figured that was the case. I
>> can stop beating my head against it now!
>>
>> Now for a trip to workaround land!
>>
>> - Devin
>>
>> On Dec 15, 2021, at 2:46 AM, Kaveh via use-livecode <
>> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>>
>> wrote:
>>
>> This is a major shortcoming and I have wanted this for years. Thierry has
>> filled the gap with his excellent SunnyRex library
>> <https://sunny-tdz.com/livecode/sunnyrex>. I have used it successfully, I
>> recommend it, and it works well. He has also supported me well after I
>> purchased SunnyRex. But it is a proprietary dependency and that is
>> something at the back of my mind.
>>
>> It would be great if LiveCode could add this feature. Or perhaps come to
>> an
>> agreement with Thierry so that we reduce dependencies.
>>
>> Regards
>> Kaveh
>>
>> On Wed, 15 Dec 2021 at 03:42, J. Landman Gay via use-livecode <
>> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>>
>> wrote:
>>
>> I wish it did, but replaceText doesn't support back references. The
>> parameters at the end are treated as literals, whether as actual quoted
>> literals or variables containing a value.
>>
>> If there isn't a feature request for it, there should be.
>> --
>> Jacqueline Landman Gay | jac...@hyperactivesw.com> jac...@hyperactivesw.com>
>> HyperActive Software | http://www.hyperactivesw.com
>> On December 14, 2021 6:03:12 PM Devin Asay via use-livecode
>> mailto:use-livecode@lists.runrev.com>>
>> wrote:
>>
>> Hi all,
>>
>> Does the replaceText() function allow the use of backreferences to
>> retain
>> groupings of text between matches. For example, if I have some text like
>> this:
>>
>> Good stuff here.
>>
>> I want to end up something like this:
>>
>> Good stuff here.”
>>
>> In BBedit I can search for (.*) and
>> replace it with \1 and it preserves the run of text designated
>> by
>> parentheses.
>> (I know, I can get more fancy on matching the runs of html tags, but I’m
>> mainly interested in retaining the text, not in regex madness.)
>>
>> In LC this does not work:
>>
>>  put replaceText(myText,">  style=“cruft”>(.*)”,”\1”) into myText
>>
>> I just end up with \1, when I want Good stuff here.
>>
>> Can replaceText even do this?
>>
>> - Devin
>>
>>
>> Devin Asay
>> Office of Digital Humanities
>> Brigham Young University
>>
>> ___
>> use-livecode mailing list
>> use-livec

Re: regex backreferences

2021-12-17 Thread Kaveh via use-livecode
Hah. I read my own comment without checking the poster and thought this guy
is a bit pushy but let's hope he succeeds! It really is a fundamental
limitation that will allow so much more to be done in LiveCode, including a
really good interactive tutorial on regex.

Regards
Kaveh

On Fri, 17 Dec 2021 at 12:49, Ben Rubinstein  wrote:

> Hi Kaveh,
>
> Thanks, but actually it wasn't me who made the original report - that was
> Bart
> Voorzanger. And you added a useful comment to it 18 months ago, before I
> found it!
>
> best,
>
> Ben
>
>
> On 17/12/2021 11:41, Kaveh wrote:
> > Great to know this is already in the wish list, Ben and thanks for
> adding it.
> > Anything we can do to support this request and expedite it?
> >
> > On Fri, 17 Dec 2021 at 11:35, Ben Rubinstein via use-livecode
> > mailto:use-livecode@lists.runrev.com>>
> wrote:
> >
> >
> > On 15/12/2021 03:41, J. Landman Gay via use-livecode wrote:
> >  > If there isn't a feature request for it, there should be.
> >
> > https://quality.livecode.com/show_bug.cgi?id=21534
> > 
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com 
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> > 
> >
> >
> >
> > --
> > Kaveh Bazargan PhD
> > Director
> > River Valley Technologies  ● Twitter
> >  ● LinkedIn
> > ● ORCID
> > 
> > *Accelerating the Communication of Research*
>


-- 
Kaveh Bazargan PhD
Director
River Valley Technologies  ● Twitter
 ● LinkedIn
 ● ORCID

*Accelerating the Communication of Research*
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: regex backreferences

2021-12-17 Thread Ben Rubinstein via use-livecode

Hi Kaveh,

Thanks, but actually it wasn't me who made the original report - that was Bart 
Voorzanger. And you added a useful comment to it 18 months ago, before I found it!


best,

Ben


On 17/12/2021 11:41, Kaveh wrote:
Great to know this is already in the wish list, Ben and thanks for adding it. 
Anything we can do to support this request and expedite it?


On Fri, 17 Dec 2021 at 11:35, Ben Rubinstein via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:



On 15/12/2021 03:41, J. Landman Gay via use-livecode wrote:
 > If there isn't a feature request for it, there should be.

https://quality.livecode.com/show_bug.cgi?id=21534


___
use-livecode mailing list
use-livecode@lists.runrev.com 
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




--
Kaveh Bazargan PhD
Director
River Valley Technologies  ● Twitter 
 ● LinkedIn 
● ORCID 


*Accelerating the Communication of Research*


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: regex backreferences

2021-12-17 Thread Kaveh via use-livecode
Great to know this is already in the wish list, Ben and thanks for adding
it. Anything we can do to support this request and expedite it?

On Fri, 17 Dec 2021 at 11:35, Ben Rubinstein via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> On 15/12/2021 03:41, J. Landman Gay via use-livecode wrote:
> > If there isn't a feature request for it, there should be.
>
> https://quality.livecode.com/show_bug.cgi?id=21534
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Kaveh Bazargan PhD
Director
River Valley Technologies  ● Twitter
 ● LinkedIn
 ● ORCID

*Accelerating the Communication of Research*
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: regex backreferences

2021-12-17 Thread Ben Rubinstein via use-livecode



On 15/12/2021 03:41, J. Landman Gay via use-livecode wrote:

If there isn't a feature request for it, there should be.


https://quality.livecode.com/show_bug.cgi?id=21534

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: regex backreferences

2021-12-15 Thread Kaveh via use-livecode
It's two years since I have been in contact, but this is the email I had:

th.do...@sunny-tdz.com

Regards
Kaveh

On Wed, 15 Dec 2021 at 16:37, Douglas A. Ruisaard via use-livecode <
use-livecode@lists.runrev.com> wrote:

> None of the links to acquire nor contact Thierry on his site (<
> https://sunny-tdz.com/livecode/sunnyrex>) work.  They just hang
> indefinitely... but the web site, itself, appears to be functrional.
>
> Can anyone provide an alternative means to contact this developer?
>
> Douglas Ruisaard
>
> Trilogy Software
>   (250) 573-3935
>
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
> Behalf Of Devin Asay via use-livecode
> Sent: Wednesday, December 15, 2021 7:54 AM
> To: How to use LiveCode
> Cc: Devin Asay
> Subject: Re: regex backreferences
>
> Thanks for confirming, Jacque and Kaveh. I figured that was the case. I
> can stop beating my head against it now!
>
> Now for a trip to workaround land!
>
> - Devin
>
> On Dec 15, 2021, at 2:46 AM, Kaveh via use-livecode <
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>>
> wrote:
>
> This is a major shortcoming and I have wanted this for years. Thierry has
> filled the gap with his excellent SunnyRex library
> <https://sunny-tdz.com/livecode/sunnyrex>. I have used it successfully, I
> recommend it, and it works well. He has also supported me well after I
> purchased SunnyRex. But it is a proprietary dependency and that is
> something at the back of my mind.
>
> It would be great if LiveCode could add this feature. Or perhaps come to an
> agreement with Thierry so that we reduce dependencies.
>
> Regards
> Kaveh
>
> On Wed, 15 Dec 2021 at 03:42, J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>>
> wrote:
>
> I wish it did, but replaceText doesn't support back references. The
> parameters at the end are treated as literals, whether as actual quoted
> literals or variables containing a value.
>
> If there isn't a feature request for it, there should be.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com jac...@hyperactivesw.com>
> HyperActive Software | http://www.hyperactivesw.com
> On December 14, 2021 6:03:12 PM Devin Asay via use-livecode
> mailto:use-livecode@lists.runrev.com>>
> wrote:
>
> Hi all,
>
> Does the replaceText() function allow the use of backreferences to
> retain
> groupings of text between matches. For example, if I have some text like
> this:
>
> Good stuff here.
>
> I want to end up something like this:
>
> Good stuff here.”
>
> In BBedit I can search for (.*) and
> replace it with \1 and it preserves the run of text designated
> by
> parentheses.
> (I know, I can get more fancy on matching the runs of html tags, but I’m
> mainly interested in retaining the text, not in regex madness.)
>
> In LC this does not work:
>
>  put replaceText(myText,"  style=“cruft”>(.*)”,”\1”) into myText
>
> I just end up with \1, when I want Good stuff here.
>
> Can replaceText even do this?
>
> - Devin
>
>
> Devin Asay
> Office of Digital Humanities
> Brigham Young University
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
> --
> Kaveh Bazargan PhD
> Director
> River Valley Technologies <http://rivervalley.io> ● Twitter
> <https://twitter.com/rivervalley1000> ● LinkedIn
> <https://www.linkedin.com/in/bazargankaveh/> ● ORCID
> <https://orcid.org/-0002-1414-9098>
> *Accelerating the Communication of Research*
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> Devin Asay
> Office of Digital Humanities
> Brigham Young University
>
> ___
> use-livecode mailing list
>

RE: regex backreferences

2021-12-15 Thread Douglas A. Ruisaard via use-livecode
None of the links to acquire nor contact Thierry on his site 
(<https://sunny-tdz.com/livecode/sunnyrex>) work.  They just hang 
indefinitely... but the web site, itself, appears to be functrional.

Can anyone provide an alternative means to contact this developer?

Douglas Ruisaard
   
Trilogy Software
  (250) 573-3935

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Devin Asay via use-livecode
Sent: Wednesday, December 15, 2021 7:54 AM
To: How to use LiveCode
Cc: Devin Asay
Subject: Re: regex backreferences

Thanks for confirming, Jacque and Kaveh. I figured that was the case. I can 
stop beating my head against it now!

Now for a trip to workaround land!

- Devin

On Dec 15, 2021, at 2:46 AM, Kaveh via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

This is a major shortcoming and I have wanted this for years. Thierry has
filled the gap with his excellent SunnyRex library
<https://sunny-tdz.com/livecode/sunnyrex>. I have used it successfully, I
recommend it, and it works well. He has also supported me well after I
purchased SunnyRex. But it is a proprietary dependency and that is
something at the back of my mind.

It would be great if LiveCode could add this feature. Or perhaps come to an
agreement with Thierry so that we reduce dependencies.

Regards
Kaveh

On Wed, 15 Dec 2021 at 03:42, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>> wrote:

I wish it did, but replaceText doesn't support back references. The
parameters at the end are treated as literals, whether as actual quoted
literals or variables containing a value.

If there isn't a feature request for it, there should be.
--
Jacqueline Landman Gay | 
jac...@hyperactivesw.com<mailto:jac...@hyperactivesw.com>
HyperActive Software | http://www.hyperactivesw.com
On December 14, 2021 6:03:12 PM Devin Asay via use-livecode
mailto:use-livecode@lists.runrev.com>> wrote:

Hi all,

Does the replaceText() function allow the use of backreferences to
retain
groupings of text between matches. For example, if I have some text like
this:

Good stuff here.

I want to end up something like this:

Good stuff here.”

In BBedit I can search for (.*) and
replace it with \1 and it preserves the run of text designated
by
parentheses.
(I know, I can get more fancy on matching the runs of html tags, but I’m
mainly interested in retaining the text, not in regex madness.)

In LC this does not work:

 put replaceText(myText,"(.*)”,”\1”) into myText

I just end up with \1, when I want Good stuff here.

Can replaceText even do this?

- Devin


Devin Asay
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Kaveh Bazargan PhD
Director
River Valley Technologies <http://rivervalley.io> ● Twitter
<https://twitter.com/rivervalley1000> ● LinkedIn
<https://www.linkedin.com/in/bazargankaveh/> ● ORCID
<https://orcid.org/-0002-1414-9098>
*Accelerating the Communication of Research*
___
use-livecode mailing list
use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Devin Asay
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: regex backreferences

2021-12-15 Thread Devin Asay via use-livecode
Thanks for confirming, Jacque and Kaveh. I figured that was the case. I can 
stop beating my head against it now!

Now for a trip to workaround land!

- Devin

On Dec 15, 2021, at 2:46 AM, Kaveh via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

This is a major shortcoming and I have wanted this for years. Thierry has
filled the gap with his excellent SunnyRex library
. I have used it successfully, I
recommend it, and it works well. He has also supported me well after I
purchased SunnyRex. But it is a proprietary dependency and that is
something at the back of my mind.

It would be great if LiveCode could add this feature. Or perhaps come to an
agreement with Thierry so that we reduce dependencies.

Regards
Kaveh

On Wed, 15 Dec 2021 at 03:42, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

I wish it did, but replaceText doesn't support back references. The
parameters at the end are treated as literals, whether as actual quoted
literals or variables containing a value.

If there isn't a feature request for it, there should be.
--
Jacqueline Landman Gay | 
jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On December 14, 2021 6:03:12 PM Devin Asay via use-livecode
mailto:use-livecode@lists.runrev.com>> wrote:

Hi all,

Does the replaceText() function allow the use of backreferences to
retain
groupings of text between matches. For example, if I have some text like
this:

Good stuff here.

I want to end up something like this:

Good stuff here.”

In BBedit I can search for (.*) and
replace it with \1 and it preserves the run of text designated
by
parentheses.
(I know, I can get more fancy on matching the runs of html tags, but I’m
mainly interested in retaining the text, not in regex madness.)

In LC this does not work:

 put replaceText(myText,"(.*)”,”\1”) into myText

I just end up with \1, when I want Good stuff here.

Can replaceText even do this?

- Devin


Devin Asay
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Kaveh Bazargan PhD
Director
River Valley Technologies  ● Twitter
 ● LinkedIn
 ● ORCID

*Accelerating the Communication of Research*
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Devin Asay
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: regex backreferences

2021-12-15 Thread Kaveh via use-livecode
This is a major shortcoming and I have wanted this for years. Thierry has
filled the gap with his excellent SunnyRex library
. I have used it successfully, I
recommend it, and it works well. He has also supported me well after I
purchased SunnyRex. But it is a proprietary dependency and that is
something at the back of my mind.

It would be great if LiveCode could add this feature. Or perhaps come to an
agreement with Thierry so that we reduce dependencies.

Regards
Kaveh

On Wed, 15 Dec 2021 at 03:42, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I wish it did, but replaceText doesn't support back references. The
> parameters at the end are treated as literals, whether as actual quoted
> literals or variables containing a value.
>
> If there isn't a feature request for it, there should be.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On December 14, 2021 6:03:12 PM Devin Asay via use-livecode
>  wrote:
>
> > Hi all,
> >
> > Does the replaceText() function allow the use of backreferences to
> retain
> > groupings of text between matches. For example, if I have some text like
> this:
> >
> > Good stuff here.
> >
> > I want to end up something like this:
> >
> > Good stuff here.”
> >
> > In BBedit I can search for (.*) and
> > replace it with \1 and it preserves the run of text designated
> by
> > parentheses.
> > (I know, I can get more fancy on matching the runs of html tags, but I’m
> > mainly interested in retaining the text, not in regex madness.)
> >
> > In LC this does not work:
> >
> >   put replaceText(myText," >   style=“cruft”>(.*)”,”\1”) into myText
> >
> > I just end up with \1, when I want Good stuff here.
> >
> > Can replaceText even do this?
> >
> > - Devin
> >
> >
> > Devin Asay
> > Office of Digital Humanities
> > Brigham Young University
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Kaveh Bazargan PhD
Director
River Valley Technologies  ● Twitter
 ● LinkedIn
 ● ORCID

*Accelerating the Communication of Research*
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: regex backreferences

2021-12-14 Thread J. Landman Gay via use-livecode
I wish it did, but replaceText doesn't support back references. The 
parameters at the end are treated as literals, whether as actual quoted 
literals or variables containing a value.


If there isn't a feature request for it, there should be.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On December 14, 2021 6:03:12 PM Devin Asay via use-livecode 
 wrote:



Hi all,

Does the replaceText() function allow the use of backreferences to retain 
groupings of text between matches. For example, if I have some text like this:


Good stuff here.

I want to end up something like this:

Good stuff here.”

In BBedit I can search for (.*) and 
replace it with \1 and it preserves the run of text designated by 
parentheses.
(I know, I can get more fancy on matching the runs of html tags, but I’m 
mainly interested in retaining the text, not in regex madness.)


In LC this does not work:

  put replaceText(myText,"  style=“cruft”>(.*)”,”\1”) into myText


I just end up with \1, when I want Good stuff here.

Can replaceText even do this?

- Devin


Devin Asay
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


regex backreferences

2021-12-14 Thread Devin Asay via use-livecode
Hi all,

Does the replaceText() function allow the use of backreferences to retain 
groupings of text between matches. For example, if I have some text like this:

Good stuff here.

I want to end up something like this:

Good stuff here.”

In BBedit I can search for (.*) and replace 
it with \1 and it preserves the run of text designated by parentheses.
(I know, I can get more fancy on matching the runs of html tags, but I’m mainly 
interested in retaining the text, not in regex madness.)

In LC this does not work:

   put replaceText(myText,"(.*)”,”\1”) into myText

I just end up with \1, when I want Good stuff here.

Can replaceText even do this?

- Devin


Devin Asay
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode