Fuzzy string matching?

Jonathan M Davis jmdavisProg at gmx.com
Fri Jul 15 22:08:33 PDT 2011


On Saturday 16 July 2011 05:07:38 dsmith wrote:
> Until recently, you could easily use std.regexp.search(target_string,
> find_string), but regexp is apparently no longer in phobos.  I seek a
> simple substitute.  std.algorithm.canFind might work, as it is bool.
> 
> Maybe try something like:
> 
> foreach(str; strings)
>     foreach(fls; system_files)
>         if(std.algorithm.canFind(fls, str))          // usage needs
> verification str ~= ".ext";

std.regex is std.regexp's replacement.

- Jonathan M davis


More information about the Digitalmars-d-learn mailing list