[SPAM] Re: need help with reinplace

Helmut K. C. Tessarek tessarek at evermeet.cx
Sat Nov 3 21:10:04 UTC 2018


Hi Ryan,

On 2018-11-03 01:45, Ryan Schmidt wrote:
> That's in the Tcl documentation:

I think you are missing my point. I don't really know Tcl, thus I would
have never thought about using `set reinplace_cmd` and or any other
workaround you Tcl experts know.

So why not add a paragraph like this to reinplace:

Since the Tcl way of how regexes are used/interpreted (or whatnot) in
reinplace truly sucks (and is fucked up), here's a way to use a regex as
it used in any other language.

set reinplace_cmd [subst -nobackslashes -nocommands
{s/bad/awesome/g}]
reinplace -E $reinplace_cmd FILE

The text in () brackets is optional.
Of course you can remove the sarcasm, but I think it has a nice touch.
Anyway, you get the idea.

Boom, all of a sudden people who read the documentation know how to use
a regex with Portfiles. Isn't that wonderful?

Cheers,
 K. C.

-- 
regards Helmut K. C. Tessarek              KeyID 0x172380A011EF4944
Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20181103/953be61e/attachment.sig>


More information about the macports-dev mailing list