May be being too simplistic but What about Perl -p -I -e "s/special/\special/g;" files
-----Original Message----- From: Mike Martin [mailto:[EMAIL PROTECTED] Sent: 16 January 2008 15:06 To: Beginners List Subject: Ideas for matching several lines of code (C) Hi I am trying to extract about 10 lines of C code from a file. this is is basically what I am doing I am changing every enstance of a special character to \special character (to avoid errors) then tryng to match this ie: print <something> if $source=~/$diff/sg which gives no output - any tips on how to approach this -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ This e-mail is from the PA Group. For more information, see www.thepagroup.com. This e-mail may contain confidential information. Only the addressee is permitted to read, copy, distribute or otherwise use this email or any attachments. If you have received it in error, please contact the sender immediately. Any opinion expressed in this e-mail is personal to the sender and may not reflect the opinion of the PA Group. Any e-mail reply to this address may be subject to interception or monitoring for operational reasons or for lawful business practices. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/