SunQuest
 
      Javascript
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Tutorialized ForumsWeb Design & DevelopmentJavascript

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old April 22nd, 2008, 05:00 PM
Chippo Chippo is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: Stockport, UK
Posts: 462 Chippo New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: 22 h 47 m 8 sec
Reputation Power: 0
Send a message via MSN to Chippo
Regexp find and seperate custom tags in a string

Hi
I am working on a CMS system for myself, Im having a bit of trouble with some reg exp.
Say i have a text string like this...
Code:
{{startcontent_categories_box}}blah blah blah<br />
<br />
$p</p>
<table cellspacing="1" cellpadding="1" width="200" border="1">
    <tbody>
        <tr>
            <td>username</td>
            <td>password</td>
        </tr>
        <tr id="rowstart">
            <td style="width: 250px"><strong>$username</strong></td>
            <td style="width: 250px">$userpassword</td>
        </tr>
    </tbody>
</table>
<p><br />
{{endcontent_categories_box}}


what I want to be able to do is run a reg exp which will find things like this on the page for me and seperate the content name, the start and end tags and the content within them.
content name would be 'categories_box'
start tag would be {{startcontent_categories_box}}
end tag would be {{endcontent_categories_box}}
and the content within would be all the html between the 2 tags.

Is this possible?

I have been trying myself but I am useless when it comes to reg exp, what I tried was...
Code:
/{{startcontent_/\d{2,50}/}}(.*?){{endcontent_/\d{2,50}/}}$/mg


If someone could help me with this it would be greatly appreciated

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentJavascript > Regexp find and seperate custom tags in a string


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway