Nirmal
Nirmal

Reputation: 13

extracting number using regular expression

I want to extract the number '123' from this:

<div class="f_right" style="padding-top:5px;">123</div>

What regular expression should I use? How can I extract just the number, without the wrapping <div>?

Upvotes: 1

Views: 220

Answers (1)

Mihai Toader
Mihai Toader

Reputation: 12253

@dario is right but if you want to do it this might work:

For yahoo pipes it should be like this.

<div class=".*?" style=".*?">(\d+)<\/div>

$1 will be your match

Upvotes: 1

Related Questions