On 5/18/08 9:24 AM, "jbv" <[EMAIL PROTECTED]> wrote:
> Does anyone have a regex to remove any text between parenthesis
> (including the
> parenthesis) ?
>
> I've tried many options, but none seems to work perfectly...
>
> For instance :
> "\(\)" removes only parenthesis with no text inside
>
> I've also tried this : "\([a-z 0-9 ]+\)", but no luck...
Try this:
make a new stack
add field "input" and field "output"
then this handler in the stack script
---------start copy
on mouseDoubleUp
get fld "input"
put "(?U)\(.*\)" into regEx
put replaceText(it, regEx, "") into ans
repeat for each word WRD in ans
put WRD & space after smoothAns
end repeat
put smoothAns into fld "output"
end mouseDoubleUp
-----end copy
the regEx says "open paren, then any character, repeating until a close
paren is found.
the (?U) says to find the shortest match rather than the longest possible
match. RegEx defaults to finding the longest possible match.
Hope this helps.
Jim Ault
Las Vegas
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution