Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Spidy's scratchpad

by Spidy (Chaplain)
on Aug 26, 2004 at 03:27 UTC ( [id://385897]=scratchpad: print w/replies, xml ) Need Help??

## sample input: h1. BA1 h2. Sample Historical Item Headline * 2005-06-14 * 2 * thumbnail.jpg * main-image.png * Photo courtesy * Button text goes here... This is the text displayed in the buttons i +n the bottom screen grid Main content goes here. Paragraph breaks will be rendered appropriatel +y Intrinsicly e-enable technically sound services before optimal benefit +s. Distinctively visualize cross-unit alignments via magnetic intelle +ctual capital. ---- ### sample output: <item headline="Sample Historical Item Headline" date="2005-06-14" typ +e="2" preview="thumbnail.jpg" link="main-image.jpg" courtesy="Photo c +ourtesy"> <intro>Button text goes here... This is the text displayed in the +buttons in the bottom screen grid</intro> <body><![CDATA[<p>Continually empower reliable web services ...</p +> <p>Seamlessly formulate 2.0 process improvements ...</p>]]></b +ody> </item>

Current Regex Progress:

h1\. (.+)\r\rh2\. (.+)\r\r\* (.+)\r\* (.+)\r\* (.+)\r\* (.+)\r\* (.+)\ +r\* (.+)\r

However, I cannot figure out how to use this regular expression to retrieve each of the paragraphs of text - so that I can wrap them into >p< tags within the output XML.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-03-28 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found