> -----Original Message----- > From: Johnstone, Colin [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 20, 2002 11:55 AM > To: '[EMAIL PROTECTED]' > Subject: Reg ex help! > > > Gidday All, > > Im reading course names in from a text file and want to > remove the course number from the end of each course name. > Can someone help me with the regex to do this. > > e.g Mathematics 2 unit (15240) > > to give me Mathematics 2 unit > > Thanking you in anticipation. >
my $course = 'Mathematics 2 unit (15240)'; $course =~ s/\(\d+\)$//; print $course; > > > Colin Johnstone > Website Project Officer > Corporate Website Unit > Public Affairs Directorate > ph 9561 8643 > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]