Tags:
create new tag
, view all tags
See BLT.

regular expression: "... a defined grammar for use in complex pattern searching." (Quoted from first reference below.) The lingua franca of Perl (do I know what lingua franca means?? My impression is that it means something like "the real (or true, or frank, or honest) language" of, for example, Perl).

Useful, I guess, but painful at times. See AboutThesePages.

Contents

Notes

Examples

  • any text -- finds "any text"

I have a bunch of pages on regular expressions in Perl on my home TWiki -- I'll have to move them here.

See , below.

Resources

Recommended

  • I just ran across an excellent resource for REs, see Power Regexps, Part II, by Simon Cozens. It is the second part of a three part article, I haven't found the URL for the first part yet. Some of it includes "verbalization" of the commands (similar to "x gets x + 1" for x = x + 1), which I find a very effective tool to learn and remember things.
  • The Regex Coach a graphical application for Linux and Windows which can be used to experiment with (Perl-compatible) regular expressions interactively.

Recommended for Specific Purposes

  • Fun with regular expressions; Deno; July 18, 2001 (?) -- How the effort to achieve Posix compliance impacts on regular expressions, why programs that use regular expressions that include things like [a..z] may not work as expected, sort order may depend on locale settings, and why [:lower] should be used instead of [a..z]. I found this in a reply Civileme made to someone: [expert] Strange behavior of AWK in Mandrake 8.1?;10 May 2002; expert@linux-mandrakePLEASENOSPAM.com, which included this:

>>export LC_LOCATE=C
>>awk -f simple.awk sample.txt

The trick is to use [:lower:] and [:upper:] type constructs to stay independent of LANG and LC_COLLATE variables--(I think you need to set both otherwise)

This is an experiment in making regular expressions (aka regexp, aka regex) easier to remember, by anthropomorphising them.

Recommended by Others

Other WikiLearn Pages on Regular Expressions

  • Page Title: Summary

  • NeditRegularExpressions: Some examples of regular expressions I`ve used in Nedit`s search and replace dialog. Hint: If you`re going to do much with the dialog, click on the `Keep Dialog...

  • RegexRegularExpressionsExplained: Regular expressions can be complicated to understand, especially if you are just learning them (as I am). I am starting a series of pages on WikiLearn explaining...

  • RegularExpression: See BLT . regular expression : `... a defined grammar for use in complex pattern searching.` (Quoted from first reference below.) The lingua franca of Perl...

  • RegularExpressionDeconstruction: Moved to RegexRegularExpressionsExplained.

Contributors

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2003-10-22 - MattWilkie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look