Answer the question
In order to leave comments, you need to log in
How to quickly find the desired element on the site?
The bottom line is that there are products on the site, and they are updated in real time (that is, new products are added) and I need to find a product with a certain price (for example, below 20).
At the moment I have all this implemented using setInterval and $.each, that is, after a certain time interval, all the goods and their prices are checked for me, and then it is checked whether the price of the goods is below 20. Is it possible to somehow simplify all this or how to implement it differently, so that, for example, there would be only that product whose price is below 20 without checking all the others
Answer the question
In order to leave comments, you need to log in
If I understand you correctly:
1) https://regex101.com/r/mb4TIr/1
2)
check("__");
function check($string){
$arr=array_unique(str_split($str,1));
return(count($arr)==1 AND $arr[0]=='_')
}
only when the line starts at 1 or more below. underlined with additional provided that neither before them, nor between them, nor after them was there any characterWell, does the line start with underscores or is there nothing in it except underscores? Because "there was no character after them" - this means that in general there is nothing in the line except underscores. And then the regular expression is simple:
^_+$
Try using some js framework like vue.js. Your problem will be solved with a couple of lines of code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question