I have the following cpde to understand, however, I am not quite sure about
$loc = eregi_replace("[[:space:]]+", " ",str_replace(","," ",$info["CITY"])
$info is an String array, with one of keys "CITY".
It do some string replace, and then what?
What's "[[:space:]]" used for??
help: eregi_replace()
Moderator: General Moderators
[:classname:] are predefined sets of characters. [:space:] includes all kind of whitespaces like space, tab, line breaks and so on.
Please use pcre (pcre_replace) instead of posix regular expressions (eregi_replace).
Please use pcre (pcre_replace) instead of posix regular expressions (eregi_replace).
http://de2.php.net/regex wrote:Tip: PHP also supports regular expressions using a Perl-compatible syntax using the PCRE functions. Those functions support non-greedy matching, assertions, conditional subpatterns, and a number of other features not supported by the POSIX-extended regular expression syntax.
http://de2.php.net/regex wrote:These regular expression functions are not binary-safe. The PCRE functions are.
-
karenhuang
- Forum Newbie
- Posts: 4
- Joined: Wed Oct 25, 2006 9:39 am
-
karenhuang
- Forum Newbie
- Posts: 4
- Joined: Wed Oct 25, 2006 9:39 am
-
karenhuang
- Forum Newbie
- Posts: 4
- Joined: Wed Oct 25, 2006 9:39 am