FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


erm? what are these?





mistuh griddlez
I'd like to know what these are called or whatever...

example?

Code:
$str = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="\\1" target="_blank">\\1</a>', $str);


that's supposed to change text to a link or something...hmm...i'm confused...anyone know where I can learn how to use them? (By them I'm reffering to the '(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)P' )

erm thanks in advance...
rohan2kool
These are known as 'Regular Expressions' and are used for text parsing. Basically, the 'this' you said is like a structure of a string, but not a specific string. A string having a similar text can be parsed using the regex. I know this is confusing.. but the concept of regex is somewhat like that.

Refer:

RegEx in PHP/tutorial: http://www.regular-expressions.info/php.html
RegEx in PHP/tutorial: http://www.sitepoint.com/article/regular-expressions-php
RegEx cheatsheet: http://www.ilovejackdaniels.com/cheat-sheets/regular-expressions-cheat-sheet/
RegEx megasite: http://www.regular-expressions.info
mistuh griddlez
Thanks! Seriously...those links you provided are just what I needed... Very Happy
Related topics
Now these are easy...
What Programs should I unintall from this list?
Whats the point of MMORPGs these days?
Anyone heard of these bands?
Free Online Games (Do not make more new threads about this)
Dems: these are merely the facts
title these osama images?
www.poxyproxy.com is BACK!!!- Access blocked sites@school
what are these pictures called?
Fri$ for Sig, Avatar
Am I allowed to install these?
FriHost - Google Rankings
What do you think of these??
My Website but not.............
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.