Filter with Regex
Posted: Mon Apr 03, 2017 4:13 pm
Hi
I have an ini file and wanted to make it easy to change the ON/OFF settings easily so I read it in and then
filter the lines to remove lines with comments emopty lines and non ON/OFF settings so that if the file is
I can filter to get
Now I can get it to work outside of livecode using PRE regex using
Im sure livecode doesn't allow the brackets so the closes i can get is
This patches what I need but it also matches Printer=OFFICE so I have to put an extra letter in front of an "OFFICE" printer.
Is there a cheat sheet of what is acceptable in Livecode or at least how alternation works or will I have to find all Thierry's posts and save them for posterity (or is that Humanity)
Regards Lagi
I have an ini file and wanted to make it easy to change the ON/OFF settings easily so I read it in and then
filter the lines to remove lines with comments emopty lines and non ON/OFF settings so that if the file is
Code: Select all
OPENONPAID=ON
CREDITCARD=ON
MIXDEFAULT=OFF
IMAGE=OPEN.png
SLIDESHOW=i1.png,o2.png
PRINTER=pOFFICE
Code: Select all
OPENONPAID=ON
CREDITCARD=ON
MIXDEFAULT=OFF
Code: Select all
.*=(ON).*|(OFF).*
Code: Select all
"*=O[NF]*"
Is there a cheat sheet of what is acceptable in Livecode or at least how alternation works or will I have to find all Thierry's posts and save them for posterity (or is that Humanity)
Regards Lagi