pbsolution 4 Posted March 1, 2015 Report Share Posted March 1, 2015 Hello,ive searched Forum but not found any similar. I have a List with Screen Resolution per examle 800x600, 1024x678 an so one. They are in a List in every new Row.How did i become them in two Variables? Like var1=800 and var2=600 !Thanks for your HelpPete Quote Link to post Share on other sites
deliter 203 Posted March 1, 2015 Report Share Posted March 1, 2015 this is some very basic regular expression I am going to show,far from the best way ,var a finds any number at the start 800(reg exp = ^\d+,var b any number at the end(reg exp = \d+$) add item to list(%screen,"800x600","Delete","Global")set(#var a,$find regular expression(%screen,"^\\d+"),"Global")set(#var b,$find regular expression(%screen,"\\d+$"),"Global") Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted March 1, 2015 Report Share Posted March 1, 2015 or if you don't like that style you can do this...(but, nothing wrong with that style above) set(#next list item,"800x600","Global")alert($list item($list from text(#next list item,"x"),0))alert($list item($list from text(#next list item,"x"),1)) alert($find regular expression(#next list item,".*?(?=x)"))alert($find regular expression(#next list item,"(?<=x).*")) CD Quote Link to post Share on other sites
pbsolution 4 Posted March 2, 2015 Author Report Share Posted March 2, 2015 Thanks to both!That helped me! Really an cool Forum here!Pete Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.