faustf Posted November 14, 2019 Share Posted November 14, 2019 hi guys i have a xml with this code <ScontoMaggiorazione> <Tipo>SC</Tipo> <Importo>30.00</Importo> </ScontoMaggiorazione> i want match 30.00 i try to do wit this regexp #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <File.au3> Local $aLDen = StringRegExp($string, '<Tipo>SC<\/Tipo>\n\r<Importo>(.*?)<\/Importo>', 3) _ArrayDisplay($aLDen,"sconto") but not work whats wrong ?? Link to comment Share on other sites More sharing options...
mikell Posted November 14, 2019 Share Posted November 14, 2019 Suggestion : replace \n\r by \s+ faustf 1 Link to comment Share on other sites More sharing options...
faustf Posted November 14, 2019 Author Share Posted November 14, 2019 thankz work .... mito😉 Link to comment Share on other sites More sharing options...
mikell Posted November 14, 2019 Share Posted November 14, 2019 5 minutes ago, faustf said: work ... Do you understand why it didn't work ? Link to comment Share on other sites More sharing options...
faustf Posted November 14, 2019 Author Share Posted November 14, 2019 yea regexp buddy explain me s+ match white space unlimited times .... forever you match a white space , because i think probably carriedge return not exist Link to comment Share on other sites More sharing options...
mikell Posted November 14, 2019 Share Posted November 14, 2019 Well \r\n or even \R would have been better to match the newline... but there are also some possible horizontal white spaces just before the <Tipo> Link to comment Share on other sites More sharing options...
faustf Posted November 14, 2019 Author Share Posted November 14, 2019 aaaaa the \r not work because have white space before ? Link to comment Share on other sites More sharing options...
seadoggie01 Posted November 14, 2019 Share Posted November 14, 2019 Yes, but also because the newline sequence is /r/n, not /n/r All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
faustf Posted November 14, 2019 Author Share Posted November 14, 2019 ups some time i am dislessic sorry seadoggie01 1 Link to comment Share on other sites More sharing options...
Musashi Posted November 14, 2019 Share Posted November 14, 2019 2 hours ago, faustf said: ups some time i am dislessic sorry To make it clear right from the beginning : This advice is meant to be a serious help. I do not intend to insult or disparage @faustf in any way. @faustf : From what I can determine, your native language is Italian (which is a beautiful language ). My problem (and maybe that of others as well) is, that sometimes I cannot even figure out what you are trying to say (in English). Perhaps it may help you, if you take a look at the following website (it's free) : https://www.deepl.com/translate As far as I can judge, the quality of the translations is better than Google. You can e.g. click on individual words in the translation and a selection of alternative words will appear. I use this site occasionally myself as a final control for long texts. My English also is far from being perfect . seadoggie01 1 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
faustf Posted November 15, 2019 Author Share Posted November 15, 2019 Amico Fritz @Musashi thankz , you win a beer , when you will come in italy (near vinci , do you know leonardo? .....probably yes), Thanks, I get up in the morning to improve myself, I go to sleep hoping to have done so. Musashi 1 Link to comment Share on other sites More sharing options...
Jury Posted November 16, 2019 Share Posted November 16, 2019 \r?\n Link to comment Share on other sites More sharing options...
jchd Posted November 16, 2019 Share Posted November 16, 2019 \R is preferable: it matches \r or \n or \r\n according to AutoIt default PCRE options. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) 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