faustf Posted May 19, 2019 Share Posted May 19, 2019 hi guys i have this pageweb with this code <li class="list-inline-item"> <span class="price"> 400.000</span> <span class="price">€</span> </li> </ul> i try to match 400.000 with this code but i dont know why in regexpbuddy work but in autoit not Local $aLPrezzi = StringRegExp($sLHtmlPage, '<span class="price">\r\n(.*?)\/span', $STR_REGEXPARRAYGLOBALMATCH) anyone can helpme?? thankz Link to comment Share on other sites More sharing options...
Developers Jos Posted May 19, 2019 Developers Share Posted May 19, 2019 @faustf, You've been here this long and are still not posting a runnable script to simulate your issue which people can test with. Wonder whether you will ever learn? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
faustf Posted May 19, 2019 Author Share Posted May 19, 2019 sorry @Jos you can remove my post ?? thankz P.S. habits die hard sorry Link to comment Share on other sites More sharing options...
Developers Jos Posted May 19, 2019 Developers Share Posted May 19, 2019 No, I would prefer you simply post an script that shows the issue so we can help you. Exit 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
mikell Posted May 19, 2019 Share Posted May 19, 2019 Trying to guess the possible issues and using the provided infos, may I suggest this pattern '<span class="price">\s*([^<]+)' youtuber 1 Link to comment Share on other sites More sharing options...
TheXman Posted May 19, 2019 Share Posted May 19, 2019 (edited) 11 hours ago, faustf said: hi guys i have this pageweb with this code <li class="list-inline-item"> <span class="price"> 400.000</span> <span class="price">€</span> </li> </ul> i try to match 400.000 with this code but i dont know why in regexpbuddy work but in autoit not Local $aLPrezzi = StringRegExp($sLHtmlPage, '<span class="price">\r\n(.*?)\/span', $STR_REGEXPARRAYGLOBALMATCH) anyone can helpme?? thankz If you copy and paste your HTML snippet into a unicode text editor, right after the first span tag but before the CRLF, for some odd reason, there is a U+FEFF (Zero Width Non-Breaking Space/BOM). So if your snippet of HTML is accurate, that is why your regular expression probably was not finding any matches. Also, because U+FEFF is a not considered one of the whitespace (\s) regular expression characters, it is why the regular expression supplied by @mikell will not work either. I'm not sure how the BOM got there, whether it is there in error, or whether it truly is a part of your HTML. But if it is truly a part of the HTML body, then you will need to handle it in your regular expression. Edited May 20, 2019 by TheXman FrancescoDiMuro 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now