Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

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 Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old November 12th, 2006, 01:02 AM
chiamingen chiamingen is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 3 chiamingen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 45 m 31 sec
Reputation Power: 0
Regexp, not match

i wanted to remove all html tag except some basic tag like <b>,<p>,<font> etc.
therefore i want to to know how to do that, i tried something like
preg_replace('/<(!b)>.+<\/\1>/i', '**tag removed**', $tempText);
or
preg_replace('/<([^bp])>.+<\/\1>/i', '**tag removed**', $tempText); (this work only for single character tag like '<b>','<p>' but not '<em>'.
example '<script>content content</script>' will be changed to '**tag removed**'
so what i want to do is something like if the tag do not match the tag i allowed, it will remove it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Regexp, not match


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 1 hosted by Hostway