Search results
Results from the WOW.Com Content Network
The string-search functions in Lua script can run extremely fast, comparing millions of characters per second. For example, a search of a 40,000-character article text, for 99 separate words (passed as 99 parameters in a template), ran within one second of Lua CPU clock time.
Regular expressions (or regex) are a common and very versatile programming technique for manipulating strings. On Wikipedia you can use a limited version of regex called a Lua pattern to select and modify bits of text from a string. The pattern is a piece of code describing what you are looking for in the string.
This text calls the Lua script itself, which is housed in the Module: namespace. The effect of this call is to send the information within the #invoke block to the Lua module, and to replace everything within the brackets with a piece of text that it sends back in return. (Literally, in the "return" statement)
Lua (/ ˈ l uː ə / LOO-ə; from Portuguese: lua meaning moon) is a lightweight, high-level, multi-paradigm programming language designed mainly for embedded use in applications. [3] Lua is cross-platform software , since the interpreter of compiled bytecode is written in ANSI C , [ 4 ] and Lua has a relatively simple C application programming ...
This function allows one to replace a target string or pattern within another string. To Lua programmers: this function works internally by calling mw.ustring.gsub. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR
This Lua module is used in system messages, ... interwikis, and files. local colon_prefix ... end-- Iterate over the text string, and replace any matched text. using ...
Returns string with the first n occurrences of target replaced with replacement. Omitting count will replace all occurrences. Space counts as a character if placed in any of the first three parameters.
This Lua module is used on approximately 4,830,000 pages, or roughly 8% of all pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox.