March 30, 2004 at 4:43 pm
I have a web enabled application. I have a few hundred records that have HTML tags in the data. Would someone have a function written to parse out the HTML tags for a specific column?
Thanks in advance
March 31, 2004 at 1:52 am
Do you have a list of tags ?
March 31, 2004 at 6:12 am
No... I was thinking about removing anything that looks like "<....>"
March 31, 2004 at 6:13 am
You likely need to do a little programming/scripting using a regular expression to remote the tags. Suggest you do a web search for "regular expression remote html tags" and you'll find the re expressions you can use.
Good luck,
Pete
March 31, 2004 at 7:42 am
Try HTML::Strip from perl. I know this is not a sql based answer but this is the easiest. If you had to absolutely do it in sql then you need to use something that will find the indexof the first "<" then the next ">" and strip anything in between. I am not the best with regex, so i will refrain on commenting on that approach. I hope this helped.
March 31, 2004 at 8:15 am
Or just use replace to replace the "<" and ">" with "<" and ">" before you put the data into the page. Then the tags will display as text rather that be processed as html tags.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply