Search a file skiping whitespace

Willy Martinez wmartinez at thisisnotmyrealemail.com
Sat Jul 16 12:05:08 PDT 2011


Hello. I'm new to D but bear with me, please.

I have several files that look like this:

71104 08924 72394 13995 49707 98696
48245 08311 44066 67172 56025 07952
00384 37808 90166 13871 94258 37216

I'm trying to read those files and search for sequences of digits inside,
hopefully with the Boyer-Moore implementation in std.algorithm.

Right now I have made a small script that iterates over the .txt files in the
current directory and reads line by line and uses find on it.

But I haven't been able to write a range that removes the whitespace and can
be used with find. It should generate one long stream of digits like:

711040892472394139954970798696482450831144066671725602507952003843780890166138719425837216

Any help?

Thanks


More information about the Digitalmars-d-learn mailing list