Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从中提取数字“123”:
<div class="f_right" style="padding-top:5px;">123</div>
我应该使用什么正则表达式?我怎样才能只提取数字而不用包装<div>?
<div>
@dario 是对的,但如果你想这样做,这可能会奏效:
对于雅虎管道,它应该是这样的。
<div class=".*?" style=".*?">(\d+)<\/div>
$1会是你的对手
$1