CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [tanker] RegExp that is giving me fits: Edit Log



FishMonger
Veteran / Moderator

Mar 22, 2017, 11:26 AM


Views: 12944
Re: [tanker] RegExp that is giving me fits


Code
use 5.010; 
use warnings;
use strict;

my @lines = ('<I32>SLEEVE (USE WITH INDEX 2)',
'<I31>SPACER, SLEEVE (UNDER BOLT HEAD) (USE WITH INDEX 73)');

foreach my $line (@lines) {
say $1 if $line =~ /(\(.+\))/
}



(This post was edited by FishMonger on Mar 22, 2017, 11:27 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Mar 22, 2017, 11:27 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives