in reply to negative look behind (again)
Just try this below code
#! /usr/bin/perl use strict; use warnings; while (<DATA>) { chomp; if(/^TAG\d{1}.*TAG\d{1}.*/) { print ">>>$_<<\n"; } } __DATA__ TAG1 text one TAG2 etc TAG1 text two TAG2 etc TAG1 text three TAG2 etc TAGS text four TAG2 etc TAG1 text five TAGT etc TAGZ text four TAGX etc
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: negative look behind (again)
by Anonymous Monk on Jan 21, 2014 at 10:18 UTC | |
by AnomalousMonk (Archbishop) on Jan 21, 2014 at 23:44 UTC |