GEOSoft Posted July 4, 2012 Share Posted July 4, 2012 Yes you can Guner7. Then You would address the array likeFor $i = 0 To Ubound($c) -1 MsgBox(0 "Test Result", $c[$i][0] & @CRLF & $c[$i][1], 2) Next George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
guner7 Posted July 6, 2012 Author Share Posted July 6, 2012 (edited) Thanks George, but I think I had confusing my question in the first place. I want to combine array of $a and $b respectively and form a new 2D array which is $c. I suppose the code you given is rather accessing their data, am I correct? By using two nest FOR loop should be able to get it done but I wish to know if there is other way which could be more simpler? Edited July 6, 2012 by guner7 Link to comment Share on other sites More sharing options...
UEZ Posted July 6, 2012 Share Posted July 6, 2012 (edited) Something like that? #include <Array.au3> Global $a[4]=["a","b","c","d"] Global $b[4]=[1,2,3,4] $c = ArrayComb($a, $b) _ArrayDisplay($c) Func ArrayComb($a1, $a2) Local $ub1 = UBound($a1) Local $ub2 = UBound($a2) Local $a3[Max($ub1, $ub2)][2] Local $i For $i = 0 To UBound($a3) - 1 If $i < $ub1 Then $a3[$i][0] = $a1[$i] If $i < $ub2 Then $a3[$i][1] = $a2[$i] Next Return $a3 EndFunc Func Max($a, $b) If $a > $b Then Return $a Return $b EndFunc Br, UEZ Edited July 6, 2012 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
guner7 Posted July 6, 2012 Author Share Posted July 6, 2012 (edited) Thanks UEZ. Your code works great! Edited July 6, 2012 by guner7 Link to comment Share on other sites More sharing options...
guner7 Posted July 15, 2012 Author Share Posted July 15, 2012 This is the best I have come up with so far: (?i)[\R\s\(]([a-z][_\d][_a-z0-9]{0,}) Hi M23, Can you explain the meaning and step of how would this expression work in expected? I couldn't even find \R in regex tutorial... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 16, 2012 Moderators Share Posted July 16, 2012 guner7,Certainly - although it is all in the Help file for StringregExp: (?i) - Case insensitive [Rs(] - Look for a newline sequence, some whitespace, or an opening parenthesis ( - Start capturing the following group which must be [a-z] - A letter [_d] - Followed by an underscore or a digit [_a-z0-9]{0,} - Followed by any number of underscores, letter or digits ) - End the capture when we find something other than an underscore, letter or digitAll clear? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
guner7 Posted July 17, 2012 Author Share Posted July 17, 2012 That would be a great 'dinner' of the day!! Thank you M23. 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