x_bennY Posted June 11, 2018 Share Posted June 11, 2018 (edited) I created a .txt db and i want to read the values using the RegEx (i know that iniread exists but i wanna know how regex works and creat my "own database") Btw, where could i find a good tutorial explaining how regex works? I read the help file but it did not help me much. My .txt data: 051=88343028.2365754 052=19078966.1324966 053=61125189.3627208 054=48630688.0627125 055=65556281.3590232 056=48912705.1316237 057=60764618.3087908 058=3329069.66959535 059=98765958.9522598 0510=80757418.0493819 0511=85644294.163586 0512=82394592.0824025 0513=53262646.2197832 0514=77111584.5041542 0515=15618731.8799041 0516=96351384.9912536 0517=10705940.2717704 I'm reading than with this function, but i don't know if it is 100% correct: $ret = StringRegExp(fileread("data.txt"), '(?i)' & $sControl & '=(.*)', 3) _arraydisplay($ret) Thx! Edited June 11, 2018 by x_bennY Link to comment Share on other sites More sharing options...
TheXman Posted June 11, 2018 Share Posted June 11, 2018 (edited) @x_bennY 7 hours ago, x_bennY said: Btw, where could i find a good tutorial explaining how regex works? Have you tried the Internet? If not, you can start here: http://lmgtfy.com/?s=d&iie=1&q=regular+expression+tutorial Then, find what works best for you. Edited June 11, 2018 by TheXman x_bennY 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...
x_bennY Posted June 11, 2018 Author Share Posted June 11, 2018 (edited) I'm not stupid, and yes, i tried (should i really need to answer it?). As i asked, i want a good tutorial with autoit functions, and this is not what i was really asking for. Your answer is totally contemptible. if you don't know how to help, or don't whant to, don't waste your time posting these things... Edited June 11, 2018 by x_bennY TheXman and Earthshine 2 Link to comment Share on other sites More sharing options...
TheXman Posted June 11, 2018 Share Posted June 11, 2018 Don't get mad at me. If you ask a dumb question, don't be surprised if you get a dumb answer. I quoted your question. It does not mention StringRegexp or AutoIt functions. Here it is again for your viewing pleasure. Regex is not exclusive to AutoIt so what would make one think that you were referring to AutoIt functions? 14 hours ago, x_bennY said: Btw, where could i find a good tutorial explaining how regex works? Whether you are stupid or not is debatable. But one thing is for sure and that is that you are factually dishonest. Earthshine and x_bennY 1 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...
jchd Posted June 11, 2018 Share Posted June 11, 2018 Indeed there are many (zillions of) good tutorials on regular expressions floating around. However be sure you focus on PCRE flavor, which AutoIt uses. The definitive documentation on the version currently implemented in AutoIt (PCRE1) can be found here : https://www.pcre.org/original/doc/html/pcrepattern.html Also AutoIt help file documents most used features, albeit not being a regexp primer. See my signature for an excellent site offering compatible regexp support, including step by step debugging and a detailed strict explanation of what a given pattern means, in plain english. x_bennY 1 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...
x_bennY Posted June 12, 2018 Author Share Posted June 12, 2018 Thanks @jchd! 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