 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
 |
|
 |
04-30-2008, 08:01 PM
|
#1 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
RegEx
Doh. Me again.
Well, been exploring the fields of RegExes and I do not understand anything of it to be exact. I am trying to write a RegEx to filter out a string like {MYTEXT} and replace it while I am doing it.
I don't know where to start off actually. Help?
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|
04-30-2008, 08:16 PM
|
#2 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
|
|
|
|
05-01-2008, 09:51 AM
|
#3 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
Thanks a lot! I am surely going to look in to that! Owe ya.
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|
05-08-2008, 05:55 PM
|
#4 (permalink)
|
|
The Contributor
Join Date: Dec 2007
Location: Belgium
Posts: 60
Thanks: 6
|
|
|
|
|
05-08-2008, 06:03 PM
|
#5 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by Geert
|
Usually books never helped me, I just learned from tutorials online. :P
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-08-2008, 06:05 PM
|
#6 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
By the way, you just want to rid of some text? lol just do
PHP Code:
$string = preg_replace('/My text/','ttt',$string);
which replaces My text with ttt in $string;
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-08-2008, 06:06 PM
|
#7 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
Nah, some books are great.
apress are my favourite so far. Everywhere I went looking for books, all I could find were the same old PHP books from various publishers - you know the ones, this is a variable, this is a control structure, this is how you write a basic little form handler script, and aren't you glad you read 500 pages so you could learn the same thing you could learn from the manual in a fifth of that? I went looking on Amazon and found apress/Matt Zandstra's PHP Objects, Patterns, and Practice, and Pro PHP, two books I would highly recommend, and I'm not even done reading them yet. Some excellent reference, examples, and a lot of things the manual doesn't go anywhere near covering.
-m
|
|
|
|
05-08-2008, 07:47 PM
|
#8 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by delayedinsanity
Nah, some books are great.
apress are my favourite so far. Everywhere I went looking for books, all I could find were the same old PHP books from various publishers - you know the ones, this is a variable, this is a control structure, this is how you write a basic little form handler script, and aren't you glad you read 500 pages so you could learn the same thing you could learn from the manual in a fifth of that? I went looking on Amazon and found apress/Matt Zandstra's PHP Objects, Patterns, and Practice, and Pro PHP, two books I would highly recommend, and I'm not even done reading them yet. Some excellent reference, examples, and a lot of things the manual doesn't go anywhere near covering.
-m
|
Lol, I've tried books of many types, including design patterns, C++, Java, Python, Pro Ajax, and more..
They were alright, they had some good tutorials, but in the end the internet won my vote. lol
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-09-2008, 10:17 AM
|
#9 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
|
+1 for Mastering Regular Expressions by O'Reilly
Great book, indeed. I've actually managed to write it from the beginning to the end and it definitely cleared some things up for me.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
|
|
|
|
05-10-2008, 08:48 AM
|
#10 (permalink)
|
|
The Contributor
Join Date: Dec 2007
Location: Belgium
Posts: 60
Thanks: 6
|
Quote:
Originally Posted by Orc
Usually books never helped me, I just learned from tutorials online. :P
|
Take my word for it. I learn most stuff from internet resources as well, however Mastering Regular Expressions is a book that goes way more in-depth than anything I ever read about regular expressions online.
Quote:
Originally Posted by xenon
+1 for Mastering Regular Expressions by O'Reilly
Great book, indeed. I've actually managed to write it from the beginning to the end and it definitely cleared some things up for me.
|
Glad you liked it too. By the way, you managed to write it? 
|
|
|
|
05-10-2008, 01:01 PM
|
#11 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
|
My bad. I meant read it 
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|