Reg Exp Help
| From: | Zach Curtis | Date: | Fri, 25 Jan 2002 16:51:45 +0000 |
| Subject: | Reg Exp Help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-82131@lists.php.net to get a copy of this message | ||
I am trying to code a regular expression that will match at the beginning of
the string the contents of $password, followed by 0 or more occurrences of
white space, followed by the contents of $int_id. The match should be case
insensitive.
Here are some examples of the strings:
This one has a 6 character $password, followed by two white spaces, followed
by a single character $int_id
9a9b9c z
This one has a 8 character $password, followed by zero white spaces,
followed by a single character $int_id
7d2ad345b
This one has a 5 character $password, followed by three white spaces,
followed by a four character $int_id
d22ad bbaw
Here is the regular expression I am trying to use that does not find the
match and produces "Warning: REG_BADRPT".
(eregi("^\$password+[[:space:]]*+\$int_id", $file_array[$i]))
Any corrections? Thanks in advance.
Zach Curtis
POPULUS