develooper Front page | perl.beginners | Postings from November 2004

Re: Regular Expression

Thread Previous | Thread Next
From:
Renqilong
Date:
November 22, 2004 00:44
Subject:
Re: Regular Expression
Message ID:
20041122164437.775cd462.renql@ipp.ac.cn
Just try the expression:
$line =~  /.*]>(.*)<.*)/

On Mon, 22 Nov 2004 13:29:10 +0530
"Anish Kumar K." <anish@vitalect-india.com> wrote:

> Hi
> 
> Suppose there is a line
> my $line= "[<a href=\"Javascript:performAction(\'Open Window\');\" class=\"[%um_class1%]\" [%um_master=createUserCourse%]>Create User</a>]";
> 
> I wanted to get the text "Create User from this line..How will I use regular expresion to extract it...
> 
> the condition is
> 
> [<a ......%]>TEXT NAME</a>]
> 
> I want only the text name from the pattern..I used $2 and all but no hope...
> 
> 
> Anish
> 
> 
> 
> 
> 


-- 
Whatever you do will be insignificant,but 
the important is you do it!


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About