in reply to Help with regex and 'like' in test::more
It seems to be deciding there are special chars in the timestamp. Try this version (\Q\E is really all that changed)–
use Test::More; my $content = <<""; <tr> <td>dr_test_class</td> <td>2014-07-23 18:01:01-04</td> </tr> my $args = { class => "dr_test_class", timestamp => "2014-07-23 18:01:01-04" }; like $content, qr{<td>$args->{class}</td> .* <td>\Q$args->{timestamp}\E</td> }xis, '/report/classes dr_test_class'; done_testing();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help with regex and 'like' in test::more
by neilwatson (Priest) on Jul 23, 2014 at 18:54 UTC | |
by Your Mother (Archbishop) on Jul 23, 2014 at 19:02 UTC |