idea: insertion operator

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Gentlemen, ever wonder if there was an easier way to do
Well how about
Yes, that's right, a new special operator (I'm overloading ^ here, but
I'm sure you can choose a wiser one that will also work at the beginng
of a line.) Anyway, this brilliant concept I hereby toss to you (and
run away). Anyway, probably not worth implementing as the $1 stuff is
more general.

Re: idea: insertion operator

Quoted text here. Click to load it

Not quite as concise, but you can use


provided 'bla' is a fixed-length string; or, with 5.10,


for any pair of patterns.


For far more marvellous is the truth than any artists of the past imagined!
Why do the poets of the present not speak of it? What men are poets who can
speak of Jupiter if he were like a man, but if he is an immense spinning
sphere of methane and ammonia must be silent? [Feynmann]

Re: idea: insertion operator

[A complimentary Cc of this posting was sent to

Quoted text here. Click to load it

IMO, the force-match-begin-here and force-match-end-here ARE crucial
for a good REx engine.  They would make 90% of usabe of lookahead and
lookbehind unnecessary.

(In your case, begin- and end-match-positions coincide; they should
not in general.  BTW - are there cases where putting end-match BEFORE
begin-match may have a reasonable semantic?)


Site Timeline