In a message dated 6/28/2010 7:49:47 P.M. Eastern Daylight Time, [email protected] writes:
[email protected] wrote: > > can anyone give me some help on a perl program to change a file of mine. > The string is: > > $_ = "from ''alam' (481) or possibly (in the sense of dumbness); > solitary; Ulam, the (6155) name of two Soldiers;--Ulam." > > Where each line is $_ > I'm trying to substitute a hyperlink for each NUMBER that is in > parenthesis only, while not touching the words in parenthesis or any other numbers. > For example, I want to change (481) in the line above to > (<href="mypage.php?481">481 ) and (6155) to (<href="mypage.php?6155">6155) and any > others without changing anything in (in the sense of dumbness). s/\((\d+)\)/(_$1_ (mip://050adf60/mypage.php?$1) )/g; Excellent! Works perfectly. Thank you so much!
