•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 455,993 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,798 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 426 | Replies: 8
![]() |
•
•
Join Date: Aug 2007
Location: Cavite,Philippines
Posts: 508
Reputation:
Rep Power: 3
Solved Threads: 68
Last edited by ryan_vietnow : Dec 5th, 2007 at 2:23 am.
"death is the cure of all diseases..."
http://ryantetek.wordpress.com
http://ryantetek.wordpress.com
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
Using ryan_vietnow's pattern, you can get the string between <h4> and </h4>.
If you wanna learn more bout regular expression, Here is the video tutorial.
P.S. ryan_vietnow, thanks. I was scratching my head over the same thing for sometime now !
php Syntax (Toggle Plain Text)
<?php $x="<h4>blah blah blah</h4>"; $reg = '/<h4>(.+)<\/h4>/'; preg_match($reg,$x,$matches); print $matches[0]; ?>
If you wanna learn more bout regular expression, Here is the video tutorial.
P.S. ryan_vietnow, thanks. I was scratching my head over the same thing for sometime now !
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
php Syntax (Toggle Plain Text)
<?php $reg = '/<h4>(.*)<\/h4>/s'; $data="<h4><font color=\"#FFFF00\">CALVARY BAPTIST CHURCH, 334-585-6455<br> 310 DOTHAN ROAD, ABBEVILLE AL 36310</font></h4>"; preg_match($reg,$data,$matches); print $matches[1]; ?>
Phew! finally. I hope this works.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Help on form validation requested. (PHP)
- I am New In MySQL. Problem With MySQL Database Plz Help. (MySQL)
- MySQL datatype problem.... (PHP)
- storing multiple email address problem (PHP)
- help with pregmatch (PHP)
- How to insert PHP in HTML language? (PHP)
Other Threads in the PHP Forum
- Previous Thread: How to give print option from the search page?
- Next Thread: Looking for php/mysql tutor 10USD/hour



Linear Mode