Problem with repeating characters in regex
- From: redtux1@xxxxxxxxxxxxxx (Mike Martin)
- Date: Thu, 27 Sep 2007 13:58:03 +0100
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
.
- Follow-Ups:
- Re: Problem with repeating characters in regex
- From: Rob Dixon
- Re: Problem with repeating characters in regex
- From: Paul Lalli
- Re: Problem with repeating characters in regex
- Prev by Date: Re: Invalid top directory at d:\perl\lib\file\find.pm line 562
- Next by Date: Re: Invalid top directory at d:\perl\lib\file\find.pm line 562
- Previous by thread: encoding problem?
- Next by thread: Re: Problem with repeating characters in regex
- Index(es):