Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
PHP Izvlačenje sadrzaja iz stringa

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
tubak



Joined: 14 Mar 2005
Posts: 133
Location: Istra

PostPosted: 15.10.2007 01:54    Post subject: PHP Izvlačenje sadrzaja iz stringa Add user to your forum ignore list Reply with quote

Molim pomoć, imam php varijablu koja sadrzi tekst. Meni treba kod koji ce u sadrzaju te varijable pronaci samo zapis tipa {ext}link{/ext}, s tim da i link i exstenzija mogu biti bilo koji osim ext "img"

Ako netko moze, mrak!
Back to top
View user's profile Send private message Visit poster's website
gorrc



Joined: 12 Jul 2007
Posts: 87

PostPosted: 15.10.2007 01:59    Post subject: Add user to your forum ignore list Reply with quote

Pogledaj si regular expressions na netu, sad ih i php podržava.

Samo što su regular expressions malo zbunjujuće za početnika ali sigurno ima velik broj primjera sličnih tvojem upitu.

_________________
www.topnogomet.com -- http://www.gorrc.blogspot.com/ - http://code.google.com/p/bet-script/
Back to top
View user's profile Send private message
tubak



Joined: 14 Mar 2005
Posts: 133
Location: Istra

PostPosted: 15.10.2007 02:05    Post subject: Add user to your forum ignore list Reply with quote

Da, kuzim, ali ne nalazim primjer!

Problem mi je sto se i ext uvijek mijenja pa nemam konstantu po kojoj mogu radit upit, a neznam ga srocit pravilno. Ako netko slučajno ima u rukavu, slobodno Smile
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 15.10.2007 08:52    Post subject: Add user to your forum ignore list Reply with quote

Code:
"!\{(\w+)\}(.+?)\{/\\1\}!"

Brijem. Ali da li je to matchalo "img" morat ćeš riješiti programski, ne u regular expressionu. Može se regexpom, ali to je onda hack
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group