The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: help with perl
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-16-2008
era era is online now
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,605
Code:
if (m%<cd>(.*?)</cd>%) { $stuff = $1 }
... provided the start and end tags are always on the same line. If there can be multiple occurrences on the same line, you need to add a loop and a /g flag, too.
Reply With Quote