Home>
How can I find a tag given its classmarket_listing_item_name
and get the text of this tag using a regular expression, provided that the regular expression will issue immediatelymatch
and not groups?
<span id="result_0_name" class="market_listing_item_name" style="color: #;">Begin</span>
https://regex101.com/r/P30LJl/1
He needs to find the tag, taking into account the presence of the class, and get the text from this tag. Text only. No groupings
sousage12122022-01-23 02:12:14If your tags can be nested, then it is impossible to solve the problem using RE. The regular does not understand recursion, and if the enclosing tag has the desired class, then its selection will not work correctly.
Sergey2022-01-23 02:12:14Thank you all for your answers) Indeed, the text without groupings could not be obtained. I had to work with them.
ModNick2022-01-23 02:12:14Related questions
- javascript : How can I transfer Recaptcha v2 for solution to another person
- javascript : How to send object from JS to PHP using POST method
- javascript : Encoding problem in python server &js browser client
- javascript : How to pass value of js variables to python(eel)?
- javascript : Highlighting an active link using Java Script
- Pass data from JavaScript to PHP
- javascript : Execute code up to a certain point
- javascript : Repeated GET request to the image when flipping the slider in the firefox browser
- javascript : How can I get the hidden site API
- javascript : Sending the form to Mail and Telegram
I didn't quite understand the question. Do you need to run through the regex the ENTIRE line with tags and so on, or do you just need to get the line inside the span by any means?
4500zenja2022-01-23 02:12:14