in reply to Re: N-Queens problem with a regex (again)
in thread N-Queens problem with a regex (again)
It's simply a matter of saving the result then forcing a backtrack.Another question :)our @results; / ... The work ... (?{ push @results, ... }) (?!) # Backtrack to find next result. /x;
Scary ! :-)))"abcde"=~/.*?(.)(?{print $1,"\n"})[0]/; #produce : abcde "abcde"=~/.*?(.)(?{print $1,"\n"})0/; #nothing
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: N-Queens problem with a regex (again)
by ikegami (Patriarch) on Aug 03, 2007 at 12:29 UTC |