Filenames, Wildcards and Pathname Expansion: Difference between revisions

From RoggeWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 37: Line 37:


{| class="wikitable" style="margin: 1em auto 1em auto"
{| class="wikitable" style="margin: 1em auto 1em auto"
|+ '''Cells left-aligned, table centered'''
|+ '''Summary of Metacharacters'''
! Duis || aute || irure
! Special<br>characters|| Usage
|-
|-
| dolor  || in reprehenderit || in voluptate velit
| . || Matches any single character except newline. In awk, dot can match newline also.
|-
|-
| esse cillum dolore || eu fugiat nulla || pariatur.
| * || Matches any number (including zero) of the single character (includigng a character specified by a regular expression) that immediately precedes it.
|}
|}

Revision as of 22:40, 1 January 2011

Regular Expressions

What is an expression? An expression doesn't literally mean what it says. An expression, even in computer technology, is not somethng to be interpreted literally. It is something that needs to be evaluated. An expression describes a result. An expression tells the computer how to produce a result.

Basic Wildcards

Wildcard Matches ? Any single character

  • Any string of character

[set] Any character in set [!set] Any character not in set

password too short

aap

?   a
*   a
[set]
[!set]

aap

Special characters Usage
row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2


Summary of Metacharacters
Special
characters
Usage
. Matches any single character except newline. In awk, dot can match newline also.
* Matches any number (including zero) of the single character (includigng a character specified by a regular expression) that immediately precedes it.