Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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 musing on the Monastery: (5)
As of 2015-04-19 11:44 GMT
Find Nodes?
    Voting Booth?

    Who makes your decisions?

    Results (358 votes), past polls