Ruby Regular Expressions - Checking the start middle and end of a line?

Posted by Steven on Stack Overflow See other posts from Stack Overflow or by Steven
Published on 2010-05-16T10:41:40Z Indexed on 2010/05/16 10:50 UTC
Read the original article Hit count: 117

Filed under:
|

Hi,

I need to get the "274.20p" out of:

<td nowrap="nowrap" class="dataRegularUlOn" style="text-align: right;">274.20p</td>

I would like to do regular expressions on:

<td    class="dataRegularUlOn"    >

so something like:

/<td(.*?)class="dataRegularUlOn"(.*?)>/

I'm using ruby, on linux.

thks

© Stack Overflow or respective owner

Related posts about ruby

Related posts about html