Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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 examining the Monastery: (8)
As of 2015-01-30 03:06 GMT
Find Nodes?
    Voting Booth?

    My top resolution in 2015 is:

    Results (247 votes), past polls