Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Converting a Text file to XML

by CountZero (Bishop)
on Nov 17, 2011 at 07:24 UTC ( #938531=note: print w/ replies, xml ) Need Help??

in reply to Converting a Text file to XML

/^\d\d\d\d$/ looks for a string of 4 digits and nothing more, thanks to the ^ and $ anchors. Just use /\d{4}/ and you will find the year.


A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Comment on Re: Converting a Text file to XML
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://938531]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (13)
As of 2015-05-22 15:24 GMT
Find Nodes?
    Voting Booth?

    In my home, the TV remote control is ...

    Results (460 votes), past polls