A2B Tech

No detours, just destinations

Regular Expressions (Regexes) - Administrator Essentials


Target Audience


This course is designed to help current and future Information Technology (IT) Administrators who need a new powerful tool in their tool belt. If you are not familiar with the term "regular expression", or if you have only seen one or two and they made you think of code-obfuscation contests, or if you still use Find/Replace functionality with plain old boring text, this course is for you.




Upon completion, an attendee should be familiar with what regular expressions are, how they work, and where their limitations are. Being able to create new regular expressions (patterns) or even understand others' "regexes" will be possible. Tools will be provided to help validate regexes so that, when used in other contexts (scripts, decent text editors, other code) there will be less wondering if the regex is malfunctioning or if the program using it is misbehaving. Advanced text-editing functions of programming languages will be open to attendees, as will the better Find and Replace (with regexes) functionality of powerful text editors.


About the Course and Technology


Part of the day-to-day job of working in IT is that we deal with text. The reason is pretty simple: we do not understand binary efficiently, and computers can be instructed with good old ASCII text, whether in assembly, compiled code, direct commands or scripts. Because the rules around text vary by context, we often need to transform it in some way. When we need to get a list of users from the directory, the native output is LDAP Data Interchange Format (LDIF), but what is wanted is a simple file with one username per line. When we want to refactor some code where a variable name may be prefixed and suffixed by different delimiters, we want to recognize the variable in all of its forms, and ignore strings that match but are not variables. When normalizing spaces in the output from the guys who still think that their Access database is even remotely worthwhile, a nearly-infinite number of transformations need to take place. Regular Expressions are made to help with all of these and more.


To those introduced to regexes, myself included, the options presented cause a kind of light to go on in their professional life that had never been there before. As a technology, it is something you may not miss until you know of its existence, since before regexes everything was just done another way, a more manual, less-flexible, much-slower way. Every transformation required a program or script, and coding those involved a lot of manual string manipulations. While complex, regexes make tasks that could take days of programming to be reliable possible in minutes. While frustrating to read at first, like everything else they get much easier with practice and meticulous dissection of the pattern. In the end, the rules are fairly straight-forward, and applying them does not take any extraordinary talent, so understanding is available to all of us.


Prior attendees have said that this is a course which should be part of every IT staff member's toolbox because of the increased efficiency they will experience. Contact us for more details and pricing information to help your staff develop necessary skills, be introduced to powerful new tools, and understand the environment in which they work already to a much greater degree.







This course is designed to take about five hours to complete. To allow participants time to absorb the material and test on their own, maybe while still doing their day job, it can work well in a "Lunch and Learn" format. Exercises will be presented with each portion of the agenda for completion before the next section is presented. If desired, it could also be done in a single day with time for exercises between sections to ensure the information is absorbed.