SunQuest
 
           General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 13th, 2002, 07:19 AM
Lasse Lasse is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 14 Lasse User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 29 sec
Reputation Power: 0
Problems with regular expressions

How do remove everything between "<FONT" and ">"?

Reply With Quote
  #2  
Old September 13th, 2002, 08:18 AM
Lindset Lindset is offline
weirdomoderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Alta, Norway
Posts: 370 Lindset User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to Lindset Send a message via AIM to Lindset
I haven't got that much experience with PCRE, but give this a shot.. I don't know if there's other better methods of doing it using PCRE:

PHP Code:
 $subject "Text Before -> <font size=\"4\" face=\"yes\">Here's some text</font> <- Text After";
$pattern "/(<font).*(>)/i";

echo 
preg_replace($pattern"\\1\\2"$subject); 


edit: sorry bout that.. there seems to be a slight problem with that expression.. I'm working on it right now
__________________
Best Regards,
Håvard Lindset

Last edited by Lindset : September 13th, 2002 at 08:23 AM.

Reply With Quote
  #3  
Old September 13th, 2002, 09:57 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Hi Lasse,
Have you have a read of my PHP regexp tutorial? It should give you a fairly good idea of how to get to grips with regexp using PHP's ereg_xxx functions. Check it out at http://www.devarticles.com/art/1/106

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Problems with regular expressions


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