Hi sean,

> > I would like to look for a match (not replace) in a string and put the
> > matched part of the string in a variable, rather than the replaced
> > string.
>
>The default behavior of match(g) is already this. Assuming \ is your
>escape character:
>
>local matched
>regex.match(?"string",?"pattern",?"\0","matched")
>regex.matchg(?"string",?"pattern","\\0\n","matched")
>
>The last one stores the LF delimited matched results to the variable
>matched.

Thanks, that worked. I was using
regex.match(?"string",?"pattern","","matched")
and it didn't work.

regards,
Nathan



------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to