Is it always at the very end of the string? If not, then are there any other numbers enclosed in parens in the course names?
Probably the following should work: $course =~ s/( \(\d+\)$//; # removes a space followed by an '(' followed by 1 or more digits, followed by ')' at the end of the string Feel free to adapt as needed. /\/\ark -----Original Message----- From: Johnstone, Colin [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 4:55 PM 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. -----End Original Message----- Top-posted because I use M$ Outlook -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]