What would be the PHP equivalent of this Perl regex?
Posted
by Jamie
on Stack Overflow
See other posts from Stack Overflow
or by Jamie
Published on 2010-05-18T13:54:38Z
Indexed on
2010/05/18
23:30 UTC
Read the original article
Hit count: 294
What would be the PHP equivalent of this Perl regex?
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";
}
© Stack Overflow or respective owner