File: track-5.10

package info (click to toggle)
libregexp-assemble-perl 0.38-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 608 kB
  • sloc: perl: 2,272; makefile: 8
file content (18 lines) | stat: -rwxr-xr-x 322 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /usr/local/bin/perl5.9.5

use strict;
use warnings;

use lib 'blib/lib';
use Regexp::Assemble;

my $r = Regexp::Assemble->new->track(1)->add(qw(foo? bar{2} [Rr]at));

for my $w (qw(this food is rather barren)) {
	if ($w =~ /$r/) {
		print "$w matched by ", $r->source($^R), $/;
	}
	else {
		print "$w no match\n";
	}
}