
chetwyn
Novice
Apr 26, 2006, 6:02 AM
Post #1 of 2
(920 views)
|
Stuck on this Rexexp... please help???
|
|
|
Hi all. I want to only retrieve the lines of text that have no spaces breaking the text. for example, here is some exmaple text: **** START **** Sydney City Plumbing Unit 3/5- 7 Stanley St Peakhurst NSW 2210 Dempsey Plumbing & Electrical 408- 410 Canterbury Rd Campsie NSW 2194 Paul Bevins 94A Cardinal Ave West Pennant Hills NSW 2125 Conomos Plumbing RPM Pipeline Maintenance Werrington Downs NSW 2747 **** END **** So I only want things like: RPM Pipeline Maintenance Werrington Downs NSW 2747 Not like Conomos Plumbing This is what I have so far but it's not working... open (IN,"teststr.txt")||die"can not open file\n"; close(IN); while(<IN>){ $_ =~ /^\w+.*\w+$/s; print $_."\n"; }
|