0
I need to take the value "R$ 0,00" in this string with a regular expression. I really don’t understand expressions, I only know the basics of the basic. There are several other values on the page with "R$" followed by the value, but I can not catch with my methods, always gives a random value of other "R$". I need something accurate. OBS: in these divs
this is the only value.
<div class="stat-number col-md-12 margin-top-10">
<div class="title">Programado (Saldo)</div>
<div class="number">
R$ 0,00
</div>
</div>
Catch with JS? show what you’ve tried
– Costamilam
use the following function to catch strings:
function GetStr($string, $start, $end){ 
$str = explode($start, $string); 
$str = explode($end, $str[1]); 
return $str[0]; 
}
usage $estimate = Getstr($result, 'mber">R$','</div ');– Estudante PHP
her work and take the first and last character from an html to locate the text, most often works well, but with many identical strings and equal tags is not good.
– Estudante PHP
Regular expressions to pick up information within an HTML? You’re calling Ctulhu and don’t notice, that’s why you feel fear in the dark. Regex to get things from HTML live in closets and come out when the lights are off to feed on the fear of children
– Jefferson Quesado