Regular expression assistance...
| From: | Jas | Date: | Fri, 05 Dec 2003 21:59:26 +0000 |
| Subject: | Regular expression assistance... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-172028@lists.php.net to get a copy of this message | ||
I am trying to match data from a database that would like like
host dhcp-01 {
hardware ethernet 00:D0:B7:BD:D2:8D;
fixed-address 155.97.1.190;
}
Using this expression
if eregi("^[host]\s+[{]\s+[hardware ethernet]\s+[fixed-address]\s+[}]$",$b) {
echo "Put into array"; }
Any help would be great, or maybe some insight into the various characters used (besides the basic, ^, $, +, etc).
Thanks in advance.
Jas