Thread: Sigil v0.1.5
View Single Post
Old 11-29-2009, 03:42 PM   #48
Punksmurf
Member
Punksmurf began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Nov 2009
Device: Sony PRS-600
Okay, I've been toying around with regular expressions.

I've the following regexp:
Code:
<span>(.*?(\w)\2\2.*<\/span>)
Which I want to apply this text:
Code:
    <p class="calibre1"><span>I had to nod.</span></p>

    <p class="calibre1"><span>"We're loading furniture right now. The ship is the Empress-out of Brysta, Nordla Lines. I'm Caron."</span></p>

    <p class="calibre1"><span>"Is this your dangergeld?" I blurted.</span></p>

    <p class="calibre1"><span>She laughed. "Not exactly. I started as a purser on the Brotherhood ships, but traveling got old. I liked dealing with cargo and making up shipments, handling the cube and stowage calculations-"</span></p>

    <p class="calibre1"><span>Whhhheeee . . .</span></p>

    <p class="calibre1"><span>"-Excuse me . . ." She was back at the cart, deftly jockeying two more crates into the net, without seeming to work up a sweat.</span></p>

    <p class="calibre1"><span>Whheeeeppp . . .</span></p>

    <p class="calibre1"><span>As the net lifted away, Caron returned. "So that's how I ended up here. I have a small farm not too far from Sigil, in the low hills north of the High Road. I spend my free time there."</span></p>
...because I want to italicalize (is that a word?) those paragraphs, using the following to replace them with:
Code:
<span class="sgc-5">$1
This works fine in RegExPal, RegExr (in which I could test the replace, too) and RegExpCheck 1.0 (offline application) which specifically mentions PERL-compatibility.

I've attached a screenshot of the offline version of RegExr, which I normally use, so if I'm not clear in my explanations, hopefully the image will be .
Attached Thumbnails
Click image for larger version

Name:	regexr.PNG
Views:	392
Size:	120.5 KB
ID:	40383  
Punksmurf is offline   Reply With Quote