The equivalent of this Perl regex in PHP
- by Jamie
Hi all,
What would be the equivalent in php of this regex in php:
I.e. which function would do the same job.
if (/^([a-z0-9-]+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)$/
and $1 ne "global" and $1 ne "") {
print " <tr>\n";
print " <td>$1</td>\n";
print " <td>$2</td>\n";
print " <td>$3</td>\n";
print " <td>$4</td>\n";
print " <td>$5</td>\n";
print " <td>$6</td>\n";
print " <td>$7</td>\n";
print " <td>$8</td>\n";
print " </tr>\n";
}
Thanks very much! :-)