Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Cleaning Up a Regular Expression
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 16 April 2008 :  08:11:28  Show Profile
This has been working great so far on the sites I've implemented on so cheers for the help there, guys

I'm revisiting how I handle bullets though, in order to try and get rid of a minor niggle that's been annoying me and that's the need to have an empty line at between the end of a list and any subsequent text, if the list isn't at the end of the string.

To recap, the RegEx I'm using for the list is:

(\[(bullet)\][\s\S]+?\[/\2\])(\s{3,}|\n{2,}|$)
<ul>$1</ul>

And for the individual list items it's:

\[(bullet)\](.+?)\[/\1\]
<li>$2</li>

Like I said, it's only a minor thing and nothing I'm going to lose too much sleep over but, if there's some way of getting rid of that extra line break, it'll bring a wee smile to my tired face


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2019 Snitz™ Communications Go To Top Of Page
This page was generated in 0.01 seconds. Powered By: Snitz Forums 2000 Version 3.4.07