Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Regex match last

by moritz (Cardinal)
on Aug 20, 2012 at 10:18 UTC ( #988424=note: print w/replies, xml ) Need Help??


in reply to Regex match last

You probably only want to match characters that are not > or /:

use 5.010; use strict; use warnings; $_ = q[<c:t="AD2343"/><c:p>65677676</c:p>]; m{<([^>/]+)/>} && say $1

Replies are listed 'Best First'.
Re^2: Regex match last
by Anonymous Monk on Aug 20, 2012 at 10:35 UTC
    i want to match only <c/> not </c> or <c>.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://988424]
help
Chatterbox?
[choroba]: TITS = Try It To See :-)
[LanX]: buongiorno!
[Discipulus]: buongiorno a te!
[choroba]: LanX ciao! BTW, yesterday evening I arrived home in my new car ;-)

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2017-01-17 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (153 votes). Check out past polls.