Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Use preg_match to isolate variables?
Old 10-07-2009, 07:33 AM Use preg_match to isolate variables?
Novice Talker

Posts: 8
Trades: 0
If I have this,
PHP Code:
preg_match("/<--[a-zA-Z0-9_]{1,}-->/""lalala<--mytext-->lalalalala"$matches); 
it returns <--mytext--> in $matches[0], but I only want mytext. Is there any way to narrow this down?

Thanks - Dave
macmee is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-07-2009, 11:19 AM Re: Use preg_match to isolate variables?
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
preg_match("/<--([a-zA-Z0-9_]{1,})-->/", "lalala<--mytext-->lalalalala", $matches);


$matches[1] will contain the value
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Use preg_match to isolate variables?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09496 seconds with 12 queries