By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,165 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,165 IT Pros & Developers. It's quick & easy.

Regex Problem

P: n/a
Hi,

I am using a xhtml class to replace all none xhtml type tags .net
creates when rendering a page. All is working fine apart from trying to
delete the border="0" at the end of a input type="image" tag ...

Anyone have any ideas how to get rid of this using regex ?

TIA

Luke

Apr 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
(?<=<input[^>]+type="image"[^>]+)border="0"(?=[^>]+>)

It's based on some assumptions ... like everything occurring on one line
and that the type= comes before the border argument.

Beyond the answer here, since you are dealing with XML (since you said
it's already xhtml) why not use the myriad of techniques for
manipulating XML ... you might find that easier to maintain.
lu********@gmail.com wrote:
Hi,

I am using a xhtml class to replace all none xhtml type tags .net
creates when rendering a page. All is working fine apart from trying to
delete the border="0" at the end of a input type="image" tag ...

Anyone have any ideas how to get rid of this using regex ?

TIA

Luke

Apr 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.