Finding orphaned "put"

Peter Haworth pete at lcsql.com
Sat May 4 19:37:24 EDT 2013


William,
Just tried out the regexp I gave you and found it needs a couple of changes
to deal with case insensitivity, looking for "before" and also dealing with
the LC script continuation char "\" which could occur at the end of a line
before the into/after/before.

The new version of the regexp is:

(?im)^\s*put\s((?!(into|after|before|\\)).)*$

It works very nicely since doing it this way lists the object and line
number of the offending script line so it's easy to go directly to them and
delete them. I discoverved a couple of orphaned puts lurking in some old
code I had!  I think I will put this check into my release procedures.



Pete
lcSQL Software <http://www.lcsql.com>


On Sat, May 4, 2013 at 2:29 PM, Jerry Jensen <jhj at jhj.com> wrote:

> On May 4, 2013, at 1:35 PM, william humphrey <bill at bluewatermaritime.com>
> wrote:
>
> > Grep is way to difficult to use for this. And it isn't just "into" it's
> > also "after".
>
> And also "before". Also a bunch of other things that you can see in the
> dictionary by finding "put". Also require white space before and after so
> you don't get stuff like "input" or "output" for us audio nerds.
> .Jerry
>
>
> _______________________________________________
> 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