https://bugzilla.wikimedia.org/show_bug.cgi?id=39766
Web browser: --- Bug #: 39766 Summary: string.find only return only a number instead of an array Product: MediaWiki extensions Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: Unprioritized Component: Scribunto AssignedTo: wikibugs-l@lists.wikimedia.org ReportedBy: thoma...@hotmail.fr CC: tstarl...@wikimedia.org, vasi...@gmail.com Classification: Unclassified Mobile Platform: --- string.find function only return a number instead of an array. Some examples: string.find("d'alfdf", "(al)") return 3 instead of {3, 4, "al"} = string.find("d'alfdf", "^([a-d'])") return 1 instead of {1, 1, d} Lua manual say : string.find (s, pattern [, init [, plain]]) Looks for the first match of pattern in the string s. If it finds a match, then find returns the indices of s where this occurrence starts and ends; otherwise, it returns nil. [...] If the pattern has captures, then in a successful match the captured values are also returned, after the two indices. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l