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
>
extracting part of a string
Link Back
Thread Tools
Search this Thread
extracting part of a string
07-13-2010, 04:59 AM
#
1
(
permalink
)
extracting part of a string
numbenator
Webmaster Talker
Posts: 523
Location: London
Trades:
0
Talkupation:
HI
Im a little stuck with regular expressions.
i basically require to extract everything after 'http://twitter.com/' and before the next '/' in the below url
http://twitter.com/ssmason/statuses/18420608816
How do i do this please?
Cheers
__________________
Please login or register to view this content.
Registration is FREE
Register
now for full access!
07-13-2010, 05:16 AM
#
2
(
permalink
)
Re: extracting part of a string
NullPointer
Will Code for Food
Latest Blog Post:
Start Services Using a Batch File
Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades:
0
Talkupation:
You don't need a regex:
PHP Code:
$parts
=
explode
(
'/'
,
'http://twitter.com/ssmason/statuses/18420608816'
);
echo
$parts
[
3
];
//ssmason
__________________
Please login or register to view this content.
Registration is FREE
|
Please login or register to view this content.
Registration is FREE
|
Please login or register to view this content.
Registration is FREE
|
Please login or register to view this content.
Registration is FREE
07-13-2010, 05:18 AM
#
3
(
permalink
)
Re: extracting part of a string
numbenator
Webmaster Talker
Posts: 523
Location: London
Trades:
0
Talkupation:
Ofcourse!! Sorry. Sometimes it takes fresh eyes.
Thanks very much for you input.
Steve
__________________
Please login or register to view this content.
Registration is FREE
« Reply to
extracting part of a string
Previous Thread
|
Next Thread
Tycoon Talk
>
Web Development and Programming Support
>
PHP Forum
>
extracting part of a string
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
1.21167
seconds with
12
queries