Category:Wren-regex: Difference between revisions

m
Now using internal links to related pages
(Created page for 'Wren-regex' module.)
 
m (Now using internal links to related pages)
 
Line 2:
'''Wren-regex''' is a module which wraps most of Go's [https://pkg.go.dev/regexp 'regexp' package] for use by Wren programmers. It consists of two classes: Regex and File. The latter contains some basic text file handling methods which may be useful for this type of application.
It is the thirty-sixth in a series of modules (listed on the language's [https[://rosettacode.org/wiki/Category:Wren |main page]]) designed to assist with writing Rosetta Code tasks so the same code does not have to be written or copy/pasted time and time again thereby bloating a task's script code unnecessarily.
 
To use it you need to copy the Wren source code (in the [https[://rosettacode.org/wiki/Category_talk:Wren-regex |talk page]]) to a text file called ''regex.wren'' and place this in the same directory as the importing script so the Wren-regex executable can find it.
 
Currently, Wren-cli does not support plug-ins though this or similar functionality is likely to be added in a future version (it's already present in [https[://rosettacode.org/wiki/Category:DOME |DOME]]). Consequently, scripts using the Wren-regex module must be run under the control of a special executable whose source code (wren-regex.go) is also included in the [https[://rosettacode.org/wiki/Category_talk:Wren-regex |talk page]]. This executable uses [https[://rosettacode.org/wiki/Category:WrenGo |WrenGo]] to translate Wren method calls to calls to the corresponding Go 'regexp' functions and can be built with a command line such as the following using Go 1.18 or later:
 
$ go build wren-regex.go
9,482

edits