Hi I am trying to capture only the first occurence of a charcter
followed by any word ie: in this sample text

!this is a first level heading
!!this is a 2nd level heading

I only want to find the first item and not the second

current code

$line=~s/\!(^\![A-Z][a-z].+)/$1/gc;

it either doesnt capture any ! or takes out the first ! when there is a double

any ideas

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to