Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
<tr><td colspan="1" rowspan="1">\d+<\/td><td colspan="1" rowspan="1" style="text-align: left;"><a style=".*" href=".*">(\w+)\s(\w+)<\/a><\/td><td colspan="1" rowspan="1" style="text-align: left;"><a onclick="loadTeamSpotlight\(jQuery\(this\)\);" rel="\w{2,3}" href="javascript:void\(0\);">(\w{2,3})<\/a><\/td><td colspan="1" rowspan="1" style="text-align: left;">\w+<\/td><td colspan="1" rowspan="1" style="text-align: center;">(\d+)<\/td><td colspan="1" rowspan="1" style="text-align: center;">(\d+)<\/td><td colspan="1" rowspan="1" style="text-align: center;">(\d+)<\/td><td colspan="1" rowspan="1" style="text-align: center;" class="active">\d+<\/td><td colspan="1" rowspan="1" style="text-align: center;">([+|-]\d+)<\/td><td colspan="1" rowspan="1" style="text-align: center;">(\d+)<\/td><td colspan="1" rowspan="1" style="text-align: center;">(\d+)<\/td><td colspan="1" rowspan="1" style="text-align: center;">\d+<\/td><td colspan="1" rowspan="1" style="text-align: center;">(\d+)<\/td><td colspan="1" rowspan="1" style="text-align: center;">\d+<\/td><td colspan="1" rowspan="1" style="text-align: center;">(\d+)<\/td><td colspan="1" rowspan="1" style="text-align: center;">\d+<\/td><td colspan="1" rowspan="1" style="text-align: center;">(\d+)<\/td><td colspan="1" rowspan="1" style="text-align: right;">\d+\.\d<\/td><td colspan="1" rowspan="1" style="text-align: right;">\d+:\d+<\/td><td colspan="1" rowspan="1" style="text-align: right;">\d+\.\d<\/td><td colspan="1" rowspan="1" style="text-align: right;">\d+\.\d<\/td><\/tr>
/
g

Description

I have used this regexp succesfully in php with flags gmU and have multiple matches. In js there is no U flag and this only returns last match. Is there anything I can do to make this work similarly in javascript?

Submitted by yorogs - 10 years ago