matchText question

Mike Bonner bonnmike at gmail.com
Wed Feb 25 18:52:42 EST 2015


          "^\s*(/\*).*" \ works, if you're trying to match opening /*
comments.
If you're trying to match lines that start with * thats a different story.
\* matches asterisk.  /\* matches /*
If you want to grab the whole comment line move the .* inside the parens.
Not sure what the "include" line you're trying to match should look like
either, something funky up there, but without seeing what you need to
match, its hard to figure out.

On Wed, Feb 25, 2015 at 4:31 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> Hey, correct me if i'm wrong, but \w+ is a geedy word grab right?  Which
> should grab to the end if the line.. Seems like the .*+ wouldn't even be
> necessary... Yep, just checked. Its not. The only part I can't get to work
> is the last line for /*.  Not sure what it is i'm not seeing.
>
> On Wed, Feb 25, 2015 at 3:53 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>
>> Yes, it was to me too. Though, I did end up breaking it down into singles
>> and they all behaved the same, which made it easier to take a WAG.  Less
>> wild than it would have otherwise been. Find the thing that's the same for
>> each part, and decide if its broke.
>>
>> On Wed, Feb 25, 2015 at 2:50 PM, stephen barncard <
>> stephenREVOLUTION2 at barncard.com> wrote:
>>
>>> On Wed, Feb 25, 2015 at 12:29 PM, Mike Bonner <bonnmike at gmail.com>
>>> wrote:
>>>
>>> > Try this instead..
>>> >     put "(?i)^\s*(\-\-\s+begin)\s+(\w+).*+|" & \
>>> >          "^\s*(on)\s+(\w+).*+|" & \
>>> >          "^\s*(function)\s+(\w+).*+|" & \
>>> >          "^\s*(command)\s+(\w+).*+|" & \
>>> >          "^\s*(private\s+function)\s+(\w+).*+|" & \
>>> >          "^\s*(private\s+command)\s+(\w+).*+|" & \
>>> >          "^\s*(\/\*\s+include).*+|" &  \
>>> >           "^\s*(\*\/).*+" \
>>> >          into expr
>>> >
>>>
>>> breaking down and displaying complex REGEX this way is very helpful.
>>>
>>> *--*
>>> *Stephen Barncard - San Francisco Ca. USA - Deeds Not Words*
>>> _______________________________________________
>>> 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