REGISTER
|
Search Tycoon Talk
|
Freelancer.com
|
Members
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.
Register Here
Forum Rules
PHP Forum
You are currently viewing our PHP Forum as a guest. Please
register
to participate.
Login
Remember Me?
Login via Freelancer.com
Tycoon Talk
>
Web Development and Programming Support
>
PHP Forum
>
Use preg_match to isolate variables?
Link Back
Thread Tools
Search this Thread
Use preg_match to isolate variables?
10-07-2009, 07:33 AM
#
1
(
permalink
)
Use preg_match to isolate variables?
macmee
Novice Talker
Posts: 8
Trades:
0
Talkupation:
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
Register
now for full access!
10-07-2009, 11:19 AM
#
2
(
permalink
)
Re: Use preg_match to isolate variables?
mgraphic
Truth Seeker
Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades:
0
Talkupation:
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.
« Reply to
Use preg_match to isolate variables?
Previous Thread
|
Next Thread
Tycoon Talk
>
Web Development and Programming Support
>
PHP Forum
>
Use preg_match to isolate variables?
Thread Tools
Search this Thread
Show Printable Version
Email this Page
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
Forum Rules
Feeds:
RSS
JS
XML
Feeds for this forum:
RSS
JS
XML
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Digg this Thread!
Add Thread to del.icio.us
Bookmark in Technorati
Tweet this thread
Page generated in
0.09496
seconds with
12
queries