CINXE.COM
Regex: special character classes
<!DOCTYPE html> <html lang="en-us"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <link rel="canonical" href="https://perlmaven.com/regex-special-character-classes" /> <link rel="prev" href="/regex-character-classes"> <link rel="next" href="/regex-quantifiers"> <link href="/atom" rel="alternate" type="application/atom+xml" title ="Perl Maven" /> <script> var user_info = ; </script> <!-- Google recommended indication of translated versions --> <title>Regex: special character classes</title> <meta name="description" content=""> <meta name="author" content="szabgab"> <!-- The Open Graph protocol --> <meta property="og:title" content="Regex: special character classes"/> <meta property="og:type" content="article"/> <meta property="og:image" content="/img/perl_maven_150x212.png"/> <meta property="og:site_name" content="Perl Maven"/> <meta property="og:description" content=""/> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css" rel="stylesheet"> <link href="/css/style.css?20210507.1" rel="stylesheet"> <link href="/static/css/site.css?20210507.1" rel="stylesheet"> <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script> <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="/javascripts/perlmaven.js?20210507.1"></script> <script src="/js/maven.js"></script> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@szabgab" /> <meta name="twitter:creator" content="@szabgab" /> <meta name="twitter:title" content="Regex: special character classes" /> <meta name="twitter:description" content="" /> <meta name="twitter:image" content="/img/perl_maven_150x212.png" /> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <nav class="navbar navbar-default navbar-fixed-top navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/">Perl Maven</a> </div> <div class="collapse navbar-collapse" id="navbar"> <ul class="nav navbar-nav "> <li><a href="/perl-tutorial">Perl Tutorial</a></li> <!-- --> <li><a href="/books">Books</a></li> <!-- --> </ul> <ul class="nav navbar-nav navbar-right "> <li><a href="/keywords">Type keyword:</a></li> <!-- --> <!-- --> <li><form id="search_form"> <input id="search_box" type="text" data-provide="typeahead" data-items="4" aria-label="Enter your search term"> </form> </li> <li><a href="/archive">Archive</a></li> <!-- --> <li><a href="/about">About</a></li> <!-- --> <!-- --> <li><a href="/atom" rel="alternate" type="application/atom+xml"><img src="/img/feed-icon16x16.png" id="atom-icon" alt="Atom feed" /></a></li> </ul> </div> </div> </nav> </div> </div> <div class="row"> <div class="col-md-2" id="left-column"> <div class="category_img"> <a href="https://perlmaven.com/perl-tutorial"><img src="/img/beginner_perl_maven_150x212.png" alt="Beginner Perl Maven tutorial" title="Beginner Perl Maven tutorial" /></a> </div> <div id="series"> <a href="/perl-tutorial">Perl tutorial</a> <hr> <ol> <li>Introduction <ol> <li> <a href="/installing-perl-and-getting-started">Installing and getting started with Perl</a> </li> <li> <a href="/hashbang">The Hash-bang line, or how to make a Perl scripts executable on Linux</a> </li> <li> <a href="/perl-editor">Perl Editor</a> </li> <li> <a href="/help">How to get Help for Perl?</a> </li> <li> <a href="/perl-on-the-command-line">Perl on the command line</a> </li> <li> <a href="/core-perl-documentation-cpan-module-documentation">Core Perl documentation and CPAN module documentation</a> </li> <li> <a href="/pod-plain-old-documentation-of-perl">POD - Plain Old Documentation</a> </li> <li> <a href="/debugging-perl-scripts">Debugging Perl scripts</a> </li> </ol> </li> <li>Scalars <ol> <li> <a href="/common-warnings-and-error-messages">Common Warnings and Error messages in Perl</a> </li> <li> <a href="/read-from-stdin">Prompt, read from STDIN, read from the keyboard in Perl</a> </li> <li> <a href="/automatic-value-conversion-or-casting-in-perl">Automatic string to number conversion or casting in Perl</a> </li> <li> <a href="/if">Conditional statements, using if, else, elsif in Perl</a> </li> <li> <a href="/boolean-values-in-perl">Boolean values in Perl</a> </li> <li> <a href="/numerical-operators">Numerical operators</a> </li> <li> <a href="/string-operators">String operators: concatenation (.), repetition (x)</a> </li> <li> <a href="/undef-and-defined-in-perl">undef, the initial value and the defined function of Perl</a> </li> <li> <a href="/quoted-interpolated-and-escaped-strings-in-perl">Strings in Perl: quoted, interpolated and escaped</a> </li> <li> <a href="/here-documents">Here documents, or how to create multi-line strings in Perl</a> </li> <li> <a href="/scalar-variables">Scalar variables</a> </li> <li> <a href="/comparing-scalars-in-perl">Comparing scalars in Perl</a> </li> <li> <a href="/string-functions-length-lc-uc-index-substr">String functions: length, lc, uc, index, substr</a> </li> <li> <a href="/number-guessing-game">Number Guessing game</a> </li> <li> <a href="/while-loop">while loop</a> </li> <li> <a href="/scope-of-variables-in-perl">Scope of variables in Perl</a> </li> <li> <a href="/short-circuit">Short-circuit in boolean expressions</a> </li> </ol> </li> <li>Files <ol> <li> <a href="/how-to-exit-from-perl-script">How to exit from a Perl script?</a> </li> <li> <a href="/stdout-stderr-and-redirection">Standard output, standard error and command line redirection</a> </li> <li> <a href="/warn">Warning when something goes wrong</a> </li> <li> <a href="/die">What does die do?</a> </li> <li> <a href="/writing-to-files-with-perl">Writing to files with Perl</a> </li> <li> <a href="/appending-to-files">Appending to files</a> </li> <li> <a href="/open-and-read-from-files">Open and read from text files</a> </li> <li> <a href="/open-files-in-the-old-way">Don't Open Files in the old way</a> </li> <li> <a href="/reading-and-writing-binary-files">Reading and writing binary files in Perl</a> </li> <li> <a href="/end-of-file-in-perl">EOF - End of file in Perl</a> </li> <li> <a href="/tell">tell how far have we read a file</a> </li> <li> <a href="/seek">seek - move the position in the filehandle in Perl</a> </li> <li> <a href="/slurp">slurp mode - reading a file in one step</a> </li> </ol> </li> <li>Lists and Arrays <ol> <li> <a href="/for-loop-in-perl">Perl for loop explained with examples</a> </li> <li> <a href="/perl-arrays">Perl Arrays</a> </li> <li> <a href="/argv-in-perl">Processing command line arguments - @ARGV in Perl</a> </li> <li> <a href="/how-to-process-command-line-arguments-in-perl">How to process command line arguments in Perl using Getopt::Long</a> </li> <li> <a href="/advanced-usage-of-getopt-long-accepting-command-line-arguments">Advanced usage of Getopt::Long for accepting command line arguments</a> </li> <li> <a href="/perl-split">Perl split - to cut up a string into pieces</a> </li> <li> <a href="/how-to-read-a-csv-file-using-perl">How to read a CSV file using Perl?</a> </li> <li> <a href="/join">join</a> </li> <li> <a href="/the-year-19100">The year of 19100</a> </li> <li> <a href="/scalar-and-list-context-in-perl">Scalar and List context in Perl, the size of an array</a> </li> <li> <a href="/reading-from-a-file-in-scalar-and-list-context">Reading from a file in scalar and list context</a> </li> <li> <a href="/stdin-in-scalar-and-list-context">STDIN in scalar and list context</a> </li> <li> <a href="/sorting-arrays-in-perl">Sorting arrays in Perl</a> </li> <li> <a href="/sorting-mixed-strings">Sorting mixed strings</a> </li> <li> <a href="/unique-values-in-an-array-in-perl">Unique values in an array in Perl</a> </li> <li> <a href="/manipulating-perl-arrays">Manipulating Perl arrays: shift, unshift, push, pop</a> </li> <li> <a href="/reverse-polish-calculator-in-perl">Reverse Polish Calculator in Perl using a stack</a> </li> <li> <a href="/using-a-queue-in-perl">Using a queue in Perl</a> </li> <li> <a href="/reverse">Reverse an array, a string or a number</a> </li> <li> <a href="/the-ternary-operator-in-perl">The ternary operator in Perl</a> </li> <li> <a href="/loop-controls-next-last">Loop controls: next, last, continue, break</a> </li> <li> <a href="/min-max-sum-using-list-util">min, max, sum in Perl using List::Util</a> </li> <li> <a href="/qw-quote-word">qw - quote word</a> </li> </ol> </li> <li>Subroutines <ol> <li> <a href="/subroutines-and-functions-in-perl">Subroutines and functions in Perl</a> </li> <li> <a href="/passing-multiple-parameters-to-a-function">Passing multiple parameters to a function in Perl</a> </li> <li> <a href="/variable-number-of-parameters">Variable number of parameters in Perl subroutines</a> </li> <li> <a href="/returning-a-list-from-a-subroutine">Returning multiple values or a list from a subroutine in Perl</a> </li> <li> <a href="/recursive-subroutines">Understanding recursive subroutines - traversing a directory tree</a> </li> </ol> </li> <li>Hashes <ol> <li> <a href="/perl-hashes">Hashes in Perl</a> </li> <li> <a href="/creating-hash-from-an-array">Creating a hash from an array in Perl</a> </li> <li> <a href="/perl-hash-in-scalar-and-list-context">Perl hash in scalar and list context</a> </li> <li> <a href="/exists">exists - check if a key exists in a hash</a> </li> <li> <a href="/delete">delete an element from a hash</a> </li> <li> <a href="/how-to-sort-a-hash-in-perl">How to sort a hash in Perl?</a> </li> <li> <a href="/count-words-in-text-using-perl">Count the frequency of words in text using Perl</a> </li> </ol> </li> <li>Regular Expressions <ol> <li> <a href="/introduction-to-regexes-in-perl">Introduction to Regexes in Perl 5</a> </li> <li> <a href="/regex-character-classes">Regex character classes</a> </li> <li> <a class="current" href="/regex-special-character-classes">Regex: special character classes</a> <span class="glyphicon glyphicon-ok"></span> </li> <li> <a href="/regex-quantifiers">Perl 5 Regex Quantifiers</a> </li> <li> <a href="/trim">trim - removing leading and trailing white spaces with Perl</a> </li> <li> <a href="/regex-cheat-sheet">Perl 5 Regex Cheat sheet</a> </li> </ol> </li> <li>Shell related functionality <ol> <li> <a href="/file-test-operators">What are -e, -z, -s, -M, -A, -C, -r, -w, -x, -o, -f, -d , -l in Perl?</a> </li> <li> <a href="/current-working-directory">Current working directory in Perl (cwd, pwd)</a> </li> <li> <a href="/running-external-programs-from-perl">Running external programs from Perl with system</a> </li> <li> <a href="/qx">qx or backticks - running external command and capturing the output</a> </li> <li> <a href="/how-to-remove-copy-or-rename-a-file-with-perl">How to remove, copy or rename a file with Perl</a> </li> <li> <a href="/reading-the-content-of-a-directory">Reading the content of a directory</a> </li> <li> <a href="/traversing-the-filesystem-using-a-queue">Traversing the filesystem - using a queue</a> </li> </ol> </li> <li>CPAN <ol> <li> <a href="/download-and-install-perl">Download and install Perl</a> </li> <li> <a href="/how-to-install-a-perl-module-from-cpan">Installing a Perl Module from CPAN on Windows, Linux and Mac OSX</a> </li> <li> <a href="/how-to-change-inc-to-find-perl-modules-in-non-standard-locations">How to change @INC to find Perl modules in non-standard locations</a> </li> <li> <a href="/how-to-add-a-relative-directory-to-inc">How to add a relative directory to @INC</a> </li> </ol> </li> <li>Examples for using Perl <ol> <li> <a href="/how-to-replace-a-string-in-a-file-with-perl">How to replace a string in a file with Perl</a> </li> <li> <a href="/read-an-excel-file-in-perl">How to read an Excel file in Perl</a> </li> <li> <a href="/create-an-excel-file-with-perl">How to create an Excel file with Perl?</a> </li> <li> <a href="/sending-html-email-using-email-stuffer">Sending HTML e-mail using Email::Stuffer</a> </li> <li> <a href="/perl-cgi-script-with-apache2">Perl/CGI script with Apache2</a> </li> <li> <a href="/json">JSON in Perl</a> </li> <li> <a href="/simple-database-access-using-perl-dbi-and-sql">Simple Database access using Perl DBI and SQL</a> </li> <li> <a href="/reading-from-ldap-in-perl-using-net-ldap">Reading from LDAP in Perl using Net::LDAP</a> </li> </ol> </li> <li>Common warnings and error messages <ol> <li> <a href="/global-symbol-requires-explicit-package-name">Global symbol requires explicit package name</a> </li> <li> <a href="/variable-declaration-in-perl">Variable declaration in Perl</a> </li> <li> <a href="/use-of-uninitialized-value">Use of uninitialized value</a> </li> <li> <a href="/barewords-in-perl">Barewords in Perl</a> </li> <li> <a href="/name-used-only-once-possible-typo">Name "main::x" used only once: possible typo at ...</a> </li> <li> <a href="/unknown-warnings-category">Unknown warnings category</a> </li> <li> <a href="/cant-use-string-as-a-hash-ref-while-strict-refs-in-use">Can't use string (...) as an HASH ref while "strict refs" in use at ...</a> </li> <li> <a href="/symbolic-reference-in-perl">Symbolic references in Perl</a> </li> <li> <a href="/cant-locate-in-inc">Can't locate ... in @INC</a> </li> <li> <a href="/scalar-found-where-operator-expected">Scalar found where operator expected</a> </li> <li> <a href="/my-variable-masks-earlier-declaration-in-same-scope">"my" variable masks earlier declaration in same scope</a> </li> <li> <a href="/cant-call-method-on-unblessed-reference">Can't call method ... on unblessed reference</a> </li> <li> <a href="/argument-isnt-numeric-in-numeric">Argument ... isn't numeric in numeric ...</a> </li> <li> <a href="/cant-locate-object-method-via-package-1">Can't locate object method "..." via package "1" (perhaps you forgot to load "1"?)</a> </li> <li> <a href="/useless-use-of-hash-element-in-void-context">Useless use of hash element in void context</a> </li> <li> <a href="/useless-use-of-private-variable-in-void-context">Useless use of private variable in void context</a> </li> <li> <a href="/readline-on-closed-filehandle">readline() on closed filehandle in Perl</a> </li> <li> <a href="/possible-precedence-issue-with-control-flow-operator">Possible precedence issue with control flow operator</a> </li> <li> <a href="/scalar-value-better-written-as">Scalar value ... better written as ...</a> </li> <li> <a href="/substr-outside-of-string">substr outside of string at ...</a> </li> <li> <a href="/have-exceeded-the-maximum-number-of-attempts">Have exceeded the maximum number of attempts (1000) to open temp file/dir</a> </li> <li> <a href="/use-of-implicit-split-to-is-deprecated">Use of implicit split to @_ is deprecated ...</a> </li> </ol> </li> <li>Other <ol> <li> <a href="/multi-dimensional-arrays-in-perl">Multi dimensional arrays in Perl</a> </li> <li> <a href="/multi-dimensional-hashes">Multi dimensional hashes in Perl</a> </li> <li> <a href="/minimal-requirement-to-build-a-sane-cpan-package">Minimal requirement to build a sane CPAN package</a> </li> <li> <a href="/statement-modifiers">Statement modifiers: reversed if statements</a> </li> <li> <a href="/autovivification">What is autovivification?</a> </li> <li> <a href="/printf">Formatted printing in Perl using printf and sprintf</a> </li> </ol> </li> </ol> </div> </div> <div class="col-md-7" id="content"> <div id="show_content"> <h1>Regex: special character classes</h1> <div id="indexes"> <ul> <li><a class="btn btn-mini btn-primary kw-button" href="/search/[]">[]</a></li> <li><a class="btn btn-mini btn-primary kw-button" href="/search/\d">\d</a></li> <li><a class="btn btn-mini btn-primary kw-button" href="/search/\w">\w</a></li> <li><a class="btn btn-mini btn-primary kw-button" href="/search/\s">\s</a></li> <li><a class="btn btn-mini btn-primary kw-button" href="/search/\D">\D</a></li> <li><a class="btn btn-mini btn-primary kw-button" href="/search/\W">\W</a></li> <li><a class="btn btn-mini btn-primary kw-button" href="/search/\S">\S</a></li> <li><a class="btn btn-mini btn-primary kw-button" href="/search/\p">\p</a></li> <li><a class="btn btn-mini btn-primary kw-button" href="/search/\P">\P</a></li> </ul> </div> <div class="prev-next"> <h2> <span class="label label-lg label-success prev"> <a href="/regex-character-classes" title="Regex character classes"><span class="glyphicon glyphicon-chevron-left"></span> Prev</a> </span> <span class="label label-lg label-success next"> <a href="/regex-quantifiers" title="Perl 5 Regex Quantifiers">Next <span class="glyphicon glyphicon-chevron-right"></span> </a> </span> </h2> </div> <div role="main" id="main"> <div id="top-poster"></div> <div id="abstract"> <div id="abstract_text"> <p> Earlier we have learned about <a href="/regex-character-classes">character classes</a>, but we have not covered everything there. There are certain character classes that are so frequently used that a special sequence was created for them. A special sequence, that will make the code shorter and more readable. <p> </div> </div> <div id="after-abstract"></div> <p> <h2>\d - digit - [0-9]</h2> <p> <span class="inline_code">\d</span> stands for "digit". It is the same as <span class="inline_code">[0-9]</span> except that it is much shorter to write and easier to read. So the regex <span class="inline_code">/\d/</span> would match a single digit. There are two ways to use this special character class. One is stand-alone as we just saw it or in this example: <span class="inline_code">/#[XYZ]-\d\d\d/</span> that will match strings like these: <p> <pre class="linenums"> #X-123 #Y-666 </pre> <p> In this case we can put quantifiers on the character class. For example <span class="inline_code">/#[XYZ]-\d{3}/</span> would mean the same as the previous regex and <span class="inline_code">/#[XYZ]-\d+/</span> would allow any number of digits (at least one) after the dash. <p> <p> The other usage is to put the <span class="inline_code">\d</span> in square brackets as part of a larger character class. For example <span class="inline_code">[\dABCDEF]</span> would match a single digit or one of the capital letters A, B, C, D, E, or F. <p> This is a character class that can match a digit of a hexa-decimal number. <p> Actually, we would probably not want to spell out the 6 letters but would write <span class="inline_code">[\dA-F]</span> and looking at this example I am not even sure I would not write <span class="inline_code">[0-9A-F]</span> instead. It is a bit longer, but in this case it feels clearer. <p> In a nutshell, they do the same, write the one that looks more readable to you. <p> <p> <h2>\w - word character - [0-9a-zA-Z_]</h2> <p> Similar to <span class="inline_code">\d</span> for digits, there is also <span class="inline_code">\w</span> that stands for "word characters". In this case "word characters" mean digits, ASCII letters, and the underscore. Actually this will also match "other connector punctuation chars plus Unicode marks" so they are not exactly the same. For specific definition look at <a href="https://metacpan.org/pod/perlrecharclass#Backslash-sequences">the documentation</a>. <p> <p> <h2>\s - whitespace - [\t\n\f\r ]</h2> <p> The third common character class sequence is <span class="inline_code">\s</span> representing a whitespace. The 5 characters it matches are horizontal tab, the newline, the form feed, the carriage return, and the space. In recent version of Perl there are some experimental changes that will probably not affect you. Check out the <a href="https://metacpan.org/pod/perlrecharclass#Backslash-sequences">details</a> if in doubt. <p> <p> <h2>\D, \W, \S - negated character classes</h2> <p> <p> As you might <a href="/regex-character-classes">remember</a> putting a caret as the first character in a character-class means that the character-class is negated. It will match any single character <b>except</b> the ones listed. So <span class="inline_code">[^\d]</span> would mean any non-digit character. <p> To make it easier to write this, perl provides the <span class="inline_code">\D</span> character-class which means exactly the same. <p> Similar to <span class="inline_code">\D</span> there are also negated versions of the other two character classes: <p> <pre class="linenums"> Character Class Negated Meaning \d \D [^\d] \w \W [^\w] \s \S [^\s] </pre> <p> <p> <p> <h2>POSIX character classes</h2> <p> <p> <a href="http://en.wikipedia.org/wiki/POSIX">POSIX</a> is a family of standards for maintaining compatibility between operating systems. Among other things it also specifies a number of "groups of characters" with a name. It has groups called <span class="inline_code">alpha</span>, <span class="inline_code">alnum</span>, etc. Perl provides special sequences to match a single character in one of these groups. <p> The syntax is <span class="inline_code">[:alpha:]</span> to match a single character from the group called <span class="inline_code">alpha</span>. <p> The POSIX character classes can only be used inside a bigger character class, so you will need to write <span class="inline_code">/[[:alpha:]]/</span> if you really wanted to match a character in the alpha group. <p> Actually it is very unlikely that you will need these character classes, but if you do, you can check out more details about them in the <a href="https://metacpan.org/pod/perlrecharclass#POSIX-Character-Classes">documentation</a>. <p> <h2>Unicode character classes</h2> <p> <a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a> is a definition of "all" the existing characters in the world. More than 100,000. Each character is described as a character point, but certain characters are also grouped together. You can use the <span class="inline_code">\p{...}</span> notation to match a single character from one of these groups. <p> For example if you need to match a Thai character you can use the <span class="inline_code">\p{Thai}</span> expression. If you need to match anything except a Thai character you can use the corresponding <span class="inline_code">\P{Thai}</span> expression. <p> You can use these as stand-alone character classes <span class="inline_code">/\p{Thai}/</span> or as part of a larger character class: <span class="inline_code">/[\p{Thai}\p{Arabic}]/</span>. <p> <p> There are, of course, a lot more details, so if you need to handle interesting characters, you should read the <a href="https://metacpan.org/pod/perlrecharclass#Unicode-Properties">documentation</a> <p> <pre class="linenums"> Expression Meaning Usage \w Word characters: [a-zA-Z0-9_] \w+ or [\w#-]+ \d Digits: [0-9] \s [\f\t\n\r ] form-feed, tab, newline, carriage return and SPACE \W [^\w] \D [^\d] \S [^\s] [:class:] POSIX character classes (alpha, alnum...) [[:alpha:]]+ or [[:alpha:]#-]+ \p{...} Unicode definitions (Alpha, Lower, That, ...) \p{Thai}+ or [\p{Thai}#!-] \P{...} Negation of Unicode character class </pre> <p> <p> <h2>Comments</h2> <p> "... as we just saw it or in this example: /#[XYZ]-\d\d\d/" I do not recall seeing it! What is the url? <p> <div id="after-content"></div> </div> <div class="prev-next"> <h2> <span class="label label-lg label-success prev"> <a href="/regex-character-classes" title="Regex character classes"><span class="glyphicon glyphicon-chevron-left"></span> Prev</a> </span> <span class="label label-lg label-success next"> <a href="/regex-quantifiers" title="Perl 5 Regex Quantifiers">Next <span class="glyphicon glyphicon-chevron-right"></span> </a> </span> </h2> </div> <hr> <div id="creators"> <img src="/img/szabgab.png" alt="Gabor Szabo" /> <!-- Gabor who runs the Perl Maven site helps companies set up <b>test automation</b>, CI/CD <b>Continuous Integration</b> and <b>Continuous Deployment</b> and other <b>DevOps</b> related systems. <p> Gabor can help refactor your old Perl code-base. <p> He runs the <a href="http://perlweekly.com/">Perl Weekly</a> newsletter. <p> <a href="https://szabgab.com/contact.html">Contact Gabor</a> if you'd like to hire his service. <p> Buy his <a href="https://leanpub.com/u/szabgab">eBooks</a> or if you just would like to support him, do it via <a href="https://www.patreon.com/szabgab">Patreon</a>. --> <div class="author_text"> Written by<br> <a href="https://www.linkedin.com/in/szabgab/">Gabor Szabo</a> </div> </div> <hr> <p> Published on 2015-04-08 </p> <div> If you have any comments or questions, feel free to post them on the source of this page in GitHub. <a href="https://github.com/szabgab/perlmaven.com/tree/main/sites/en/pages//regex-special-character-classes.txt">Source on GitHub.</a> <a href="https://github.com/szabgab/perlmaven.com/issues/new?title=&body=https://perlmaven.com/regex-special-character-classes">Comment on this post</a> </div> </div> </div> <div class="col-md-3"> <div id="right-side"> <div class="author-rightbox"> <h3>Author: Gabor Szabo</h3> <img src="/img/szabgab.png" alt="" /> Gabor who runs the Perl Maven site helps companies set up <b>test automation</b>, CI/CD <b>Continuous Integration</b> and <b>Continuous Deployment</b> and other <b>DevOps</b> related systems. <p> Gabor can help refactor your old Perl code-base. <p> He runs the <a href="http://perlweekly.com/">Perl Weekly</a> newsletter. <p> <a href="https://szabgab.com/contact.html">Contact Gabor</a> if you'd like to hire his service. <p> Buy his <a href="https://leanpub.com/u/szabgab">eBooks</a> or if you just would like to support him, do it via <a href="https://www.patreon.com/szabgab">Patreon</a>. </div> <div class="rightbox"> </div> <div class="rightbox"> </div> <div class="rightbox"> <div id="related_all"> <div id="related"> <b></b> <ul> <li><a href="/regex-character-classes">Regex character classes</a></li> </ul> </div> </div> </div> </div> </div><!-- end of right column --> </div> </div> <div id="modal"></div> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-BLRW8KB16K"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-BLRW8KB16K'); </script> </body> </html>