Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Pattern Matching Confusion

by bofh_of_oz (Hermit)
on Aug 11, 2005 at 14:04 UTC ( #482961=note: print w/replies, xml ) Need Help??


in reply to Pattern Matching Confusion

Your code is trying to match a specific string, not a string of certain length. If you want any string between any two tags(the same tags) that is of specific length, then use a regex like this:

if ($record =~ /<(.+)>([^<>]{58})<\/\1>/g) {print "$2\n";}

--------------------------------
An idea is not responsible for the people who believe in it...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://482961]
help
Chatterbox?
[Eily]: erix well I did click on the walking icon
LanX giggles!
[LanX]: Eily I'm duing this constantly with people from rival cities ...MUCHO fun!
[Eily]: The best example of that is the TGV, they couldn't decide who would get it so it's in the middle of nowhere halfway between the two
[LanX]: Eily: that rings a bell
[erix]: interesting difference, I suppose they use different data/routes (and shorter seems better, no?)
[LanX]: Montabaur station
[erix]: (I used http://afstandmete n.nl/ )
LanX The stations of Limburg Süd and Montabaur, which are approximately 20 km apart, ...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2017-12-13 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (369 votes). Check out past polls.

    Notices?