Cool...that worked...thanks I forgot to mention that one the match is found I do a search and replace
if (/[0-9.]{6} setgray/) { s/.90000 set/-50.2 v \n.90000 set/; This is the issue. I need to "grab" the match number (whatever it is) and add it into the s/ So... if (/[0-9.]{6} setgray/) { s/NUMBER_FROM_ABOVE set/-50.2 v \nNUMBER_FROM_ABOVE set/; >On Fri, 11 Mar 2005 09:44:16 -0500, Wiggins d'Anconia wrote: > >>FlashMX wrote: >>> Hi, >>> >>> I need to modify some existing code. The below line checks a file I'm >>> reading in and does a search/replace based on the match. Currently I'm >>> looking for... >>> >>> if (/00000 set/) { ...etc. >>> >>> Because the "000000" can change to different numbers (but always 6 figures >>> which could include a period) how can I do a wildcard search? >>> >>> For example I also need to search for ".00000". Or it could also be >>> ".45306" or "123456" etc. >>> >>> if (/WILDCARD set/) { ...etc. >>> >>> >>> >>> >> >>You can use a character class that includes the digits and a dot, and >>match on it six times, >> >>if (/[0-9.]{6} set/) { >> >>HTH, >> >>http://danconia.org >> >>-- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >><http://learn.perl.org/> <http://learn.perl.org/first-response> >> > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>