> On Apr 19, 2021, at 1:47 PM, Mark Wieder via use-livecode > <use-livecode@lists.runrev.com> wrote: > > On 4/19/21 11:04 AM, J. Landman Gay via use-livecode wrote: > >> I don't think lineoffset supports wildcards, but you could do it with >> matchChunk. > > Ah! matchChunk and the the number of lines of... etc... > That should do it.
Another way to do it is to use 'filter' to get the text of the line that matches your wildcard, and then 'lineOffset' to find that line: put tScript into tTemp filter tTemp with ("local*" & tFunctionName & "*") put lineOffset((cr & tTemp & cr),(cr & tScript & cr)) into tPos Not sure if 'filter' is faster than 'matchChunk' when dealing with large scripts, but I have a feeling it might be... Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Website: https://www.sonsothunder.com _______________________________________________ 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