delete end chars

JB sundown at pacifier.com
Sun Aug 24 16:43:25 EDT 2014


I still can’t get it to work for some reason.  And the
first regex one ends up leaving me the letters that
I wanted to delete instead of leaving the other part.

After getting the others to work in a new stack I tried
them in the script I needed it for and the only one that
would work is the one Colin Holgate wrote.

It seems the ones that used “the text” int the script might
need to refer to a field and not a variable so I re wrote the
script to use a field and it still did not work.  I think it might
be due to the place in the script I needed it is nested deep\
in some repeat commands.

Once again thank you and everyone else for the help.

John Balgenorth


On Aug 24, 2014, at 12:35 PM, Peter Haworth <pete at lcsql.com> wrote:

> On Sun, Aug 24, 2014 at 10:35 AM, JB <sundown at pacifier.com> wrote:
> 
>> (tString1,"(.*)" & tString2 & "$",tString1,tStart,tEnd)
> 
> 
> My apologies, should have tested it first!  It should be:
> 
> if matchChunk(tString1,".*(" & tString2 & ")$",tStart,tEnd) then
>   delete char tStart to tEnd of tString1
> end if
> 
> Pete
> lcSQL Software <http://www.lcsql.com>
> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 





More information about the use-livecode mailing list