I'll try to answer one of your questions... >I'm having some trouble trying to easily remove lines from a data file using >a regular expression. I can do it by reading the file in >a line at a time then deciding whether to chuck it or write it out. My data >looks something like this -
[Data removed] >What I need to do is to remove all of the 'tags' from the file >my best attempt so far has been > >$file_with_no_tags =~ s/<<TAG:.+>>//sig; > >which removes everything from the first '<<TAG:' to the last '>>' > >Is their a better way? (Actually any way that works would be better) The way to make a + or * in a regexp non-greedy is to add a ? after it, so your line would be: $file_with_no_tags =~ s/<<TAG:.+?>>//sig; Hope this helps, /\/\ark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]