[Nix-dev] [nix language] strings that have paths/derivations embedded

Eelco Dolstra eelco.dolstra at logicblox.com
Tue Oct 9 16:08:46 CEST 2012


Hi,

On 09/10/12 06:09, Mathijs Kwik wrote:

> I'm trying to escape a string using lib.escape.
> My goals is to turn a string into a regex for grep that matches just
> that string, so I need to escape regex special characters like . and
> *.

I just want to caution that doing this kind of string manipulation in the Nix
language is likely to be very slow, so it's generally not a good idea!  It's
much better to do this in a builder.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list