[thelist] SQL SELECT and RegEx

Chris Dempsey evolt at cubeit.co.uk
Thu Dec 13 03:39:00 CST 2007


Hi All,

 

Thanks for the responses.

 

@Rudy

> how would you remove the following html [with Access's Replace() function]

> 

>   <ul>

>   <li><a href="foo.html" class="nav">foo</a></li>

 

I doubt Replace() could handle a job that complex but all I need to strip is
the first <em> tag so I'll investigate this later this morning.

> the real problem is why there aren't two versions of the 

> content -- plain text and marked up

 

Purely because we adapted the Shopping Cart software to accept HTML markup
in the product name field, originally it was plain text only.  Client
required to be able to put part of some product names in italics due to them
being Latin names.

 

Right now I need to find the least intensive solution to being able to
remove the HTML so that the products can be displayed in alphabetical order
[ORDER BY fldName DESC fails when some products start '<p>Product1  Name...'
and others start '<p><em>Product2 Name...']

 

Maintaining plain and html versions of the product names is definitely one
option that would work for sure, but I think will take more work to
implement.  Also means that future updates to the Store Software may not
install over our customised version seamlessly.  I'm assuming the less code
I have to touch to make this happen the easier future maintenance is likely
to be.

 

Think that's given me enough to go on to present the Client with a couple of
options.

 

Thanks,

 

Chris.




More information about the thelist mailing list