Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Bart Lateur
On Thu, 10 Aug 2000 04:42:56 -0400, Ilya Zakharevich wrote: Variable interpolation can be handled using Damian's curried expressions. On XRay: Summary for query "curried;Damian": found 0 matches in 0 files. Look up RFC 23 on http://dev.perl.org/rfc/: "Higher order functions". --

Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Ilya Zakharevich
On Thu, Aug 10, 2000 at 11:12:28AM +0200, Johan Vromans wrote: Of course, we need group names (trivial), and group temporaries. I needed the latter to define a generic pattern to match quoted strings: you need to store the starting quote somewhere to find the ending quote, but I didn't want

Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Johan Vromans
On Thu, Aug 10, 2000 at 07:04:50AM -0400, Ilya Zakharevich wrote: $quoted = qr/(['"]).*?\2/; @a = $str =~ /($quoted)/gp; Here //p is the "postponed" flag. Put (?p{$quoted}) instead of $quoted to get this semantic now (or some other char). $quoted = qr/(['"]).*?\1/; @a = $str =~

Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Johan Vromans
On Thu, Aug 10, 2000 at 04:42:56AM -0400, Ilya Zakharevich wrote: These are just user-defined ops. You should be able to overwrite the normal ops, as in: sub match_all { use re_ops 'overload_usual_ops'; "(" . group(1, [ 'a' .. 'z' ] * [3,5] ) . ")" } Will this go? I think

Re: Proposal for \v and \V, the small- and large- cut regex opera tors.

2000-08-10 Thread Johan Vromans
On Wed, Aug 09, 2000 at 04:20:32PM -0400, Ilya Zakharevich wrote: It is not clear though how to design concise-but-no-line-noise notation for \w etc. But qr/ \( ( [a-z]{3,5} ) \) / may become "(" (.) group(1, [[ 'a' .. 'z' ]] (*) [3,5] ) (.) ")" here (.) is the ASCII substitution for