Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Spidy's scratchpad

by Spidy (Chaplain)
on Aug 26, 2004 at 03:27 UTC ( #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?

What's my password?
Create A New User
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2017-08-20 01:40 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (313 votes). Check out past polls.