Training, Open Source Programming Languages

This is page

Our email: • Phone: 01144 1225 708225

For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Lua module U108
Pattern matching
Exercises, examples and other material relating to training module U108. This topic is presented on public courses Learning to program in Lua, Lua Programming, Lua Programming

Articles and tips on this subjectupdated
4366Changing what operators do on objects - a comparison across different programming languages
In Object Oriented languages, you used named pieces of code known as methods to perform an operation on a variable - for example you might write   weeklist.extend(weekend) to take a list of (something) for a week and add a list relating to weekend onto the end of it. Sometimes, the method ...
3687Binary / bitwise operations in Lua with the standard bit32 library
If you want to do bit manipulation in Lua, you can use the bit32 library (which is loaded as a table) from Lua 5.2, and it's backported to newer Lua 5.1 versions as well. Bit manipulation is particularly useful in applications where data is packed into a series of bytes - in effect an array of booleans. Let's ...
2383Lua Regular Expressions
OK - don't believe the headline - Lua doesn't support "Regular expressions" but it does have pattern matching. Why? Because Lua is designed to have a small footprint, and a conventional Regular Expression library would be 'bloat' - the pattern matching that's provided looks similar, and offers 80% ...
2727Making a Lua program run more than 10 times faster
I made an extraordinary claim on Thursday. One of my delegates had written a program that analyzed a huge data file in a Lua script, and it was taking over half an hour to run. "Give me five minutes, and I could have that running in less that five minutes" I claimed. It was all to do with pattern ...
2702First and last match with Regular Expressions
Conventional Wisdom says that it's pointless to start a regular expression with ".*" or ".+", as this is implied within a match - regular expression matches are looking for strings that are contained anyway: '/abc/' - contains abc '/.*abc/' - contains anything or nothing, followed by abc However - ...
1847Lua - IAQ (Infrequently Answered Questions)
Here are a handful of "one line" answers from the end of the Lua Course I was running at the end of last week • Command line parameters in Lua are available to the program in an indexed table called arg. (Sample Program) • Functions in Lua can look at the number and type of parameters they're ...
1744Lua examples, Lua Courses
Programming training is much more effective if the delegates are shown how a particular program is written, rather than just the final result ... show them just the final result and they'll ask "but how did you come up with that?" So whenever possible, I write new examples in front of my delegates - ...
Examples from our training material
dls   Pattern substitute, pattern match and extract
iiapc   Pattern matching in Lua (not Regular Expressions)
lpm   Anchoring and delimiting patterns
patplode   iterating through a string, choosing a pattern
pcis   Pattern match and extract - a postcode
slander0   Pattern matching - SLOW code
slander1   Pattern matching - FAST code
split   split or explode in Lua
stratch   String Pattern Matching
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from [here].
Topics covered in this module
Anchors, literal characters, counts and groups.
Capturing matchs, capturing all the matches (global)
Pattern Based functions.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Ruby, Lua, Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre.

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: • WEB: • SKYPE: wellho

PAGE: • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb