Congratulations to vtecmec for winning May/June's Lude Of The Month, with his DIY Turbo BB1 build.

>>> Click Here For Profile <<<

Image

Just tinkering

User avatar
Kawa
Posts: 3404
Joined: Sun Jun 20, 2010 5:58 pm
My Generation: 4G
XBOX GamerTag: kawa222
Location: Nottingham
Contact:

Just tinkering

Post by Kawa » Tue Apr 30, 2013 7:05 pm

Just tinkering...

User avatar
indigolemon
The Chaos Engine
Posts: 6676
Joined: Wed Jun 30, 2010 1:45 pm
My Generation: 4G
PSN GamerTag: M149YSL
Location: Kelty, Fife
Has thanked: 20 times
Been thanked: 70 times
Contact:

Post by indigolemon » Tue Apr 30, 2013 7:06 pm

With what? :o
'On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.' - Charles Babbage

User avatar
Donald
Supporter 2015
Posts: 9894
Joined: Sun Jun 12, 2011 10:17 pm
My Generation: 0G
Location: Earth 3.0
Been thanked: 5 times

Post by Donald » Tue Apr 30, 2013 7:08 pm

His tinkle.

User avatar
nitin_s1
Posts: 10455
Joined: Tue Aug 03, 2010 1:09 pm
My Generation: 5G
PSN GamerTag: N171N
Location: London
Has thanked: 133 times
Been thanked: 114 times
Contact:

Post by nitin_s1 » Tue Apr 30, 2013 7:08 pm

I felt it. :oops:

User avatar
Kawa
Posts: 3404
Joined: Sun Jun 20, 2010 5:58 pm
My Generation: 4G
XBOX GamerTag: kawa222
Location: Nottingham
Contact:

Post by Kawa » Tue Apr 30, 2013 7:09 pm

lude profiles :D

User avatar
Kawa
Posts: 3404
Joined: Sun Jun 20, 2010 5:58 pm
My Generation: 4G
XBOX GamerTag: kawa222
Location: Nottingham
Contact:

Post by Kawa » Tue Apr 30, 2013 9:07 pm

@indigolemon - King of preg_match :)

Need to extract everything between the first occurrence of an [img]and[/img] from a string please :D

User avatar
indigolemon
The Chaos Engine
Posts: 6676
Joined: Wed Jun 30, 2010 1:45 pm
My Generation: 4G
PSN GamerTag: M149YSL
Location: Kelty, Fife
Has thanked: 20 times
Been thanked: 70 times
Contact:

Post by indigolemon » Tue Apr 30, 2013 9:10 pm

Hokey, leave it with me - will have a play :)
'On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.' - Charles Babbage

User avatar
Kawa
Posts: 3404
Joined: Sun Jun 20, 2010 5:58 pm
My Generation: 4G
XBOX GamerTag: kawa222
Location: Nottingham
Contact:

Post by Kawa » Tue Apr 30, 2013 9:11 pm

coolio

User avatar
indigolemon
The Chaos Engine
Posts: 6676
Joined: Wed Jun 30, 2010 1:45 pm
My Generation: 4G
PSN GamerTag: M149YSL
Location: Kelty, Fife
Has thanked: 20 times
Been thanked: 70 times
Contact:

Post by indigolemon » Tue Apr 30, 2013 9:15 pm

How's this? Assumed $content for post content (not all my own work btw)

Code: Select all

if (preg_match('/^.*\[img\](.+?)\[\/img\]/i', $content, $matches)) {
    echo $matches[1];
} 
'On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.' - Charles Babbage

User avatar
NafemanNathan
LotM Winner
Posts: 20144
Joined: Sun Aug 08, 2010 9:37 pm
My Generation: 0G
Location: Yeovil, Somerset
Has thanked: 8 times
Been thanked: 121 times

Post by NafemanNathan » Tue Apr 30, 2013 9:45 pm

Yeah that looks about right.

WTF?!

Post Reply

Return to “Archive”