in reply to Re^3: search of a string in another string with 1 wildcard
in thread search of a string in another string with 1 wildcard

To extend to any number of non-adjacent wildcards, is it a good idea to put the 2 lines in a loop or would it be better to do in another way?

for (j in 1:wildcards_nb){ #where wildcards_nb is the user's free para +meter substr($regex, $i, 1) = '.'; push @regexes, $regex; }

Replies are listed 'Best First'.
Re^5: search of a string in another string with 1 wildcard
by roboticus (Chancellor) on Jul 29, 2014 at 03:52 UTC

    carolw:

    It depends. I've just re-read this thread, and I can't quite tell exactly where you're going with this. If you'd explain what you're doing in a little more detail, it would be easier to suggest an approach.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.