There is a text

<td class="pageHeading" align="right" valign="top">891&nbsp;грн. <span class="smallText"> 

There is a regular expression:

 var regExp=/<td class="pageHeading"\salign="right"\svalign="top">\S+/; 

How to make the regular expression take into account that the search is completed on UAH. ?

Tried such a regular expression - did not work:

 var regExp=/<td class="pageHeading"\salign="right"\svalign="top">\S+(грн)/ 
  • What does "search ends in UAH" mean? - Enikeyschik
  • there may be different currencies, but I need to work with UAH. - Artem
  • Replace \S+ with \S+грн\. . Even better at [^<\s]+грн\. - Wiktor Stribiżew
  • Are there any other recording options? For some reason, such an expression finds a value in the sublime, but not in the program. / <td \ sclass = "pageHeading" \ salign = "right" \ svalign = "top"> \ S + UAH / - Artem
  • It was necessary to specify what should remain after the search. If you need to грн , at the end you can put ...\S+?(?=грн) - Alexander Lonberg

0