Simple Strings

 < Day Day Up > 

The most basic regular expression is a simple string that contains no special characters except the delimiters. A simple string matches only itself (Table A-1). In the examples in this appendix, the strings that are matched are underlined and look like this.

Table A-1. Simple strings

Regular expression

Matches

Examples

/ring/

ring

ring, spring, ringing, stringing

/Thursday/

Thursday

Thursday , Thursday's

/or not/

or not

or not, poor nothing


     < Day Day Up > 


    A Practical Guide to LinuxR Commands, Editors, and Shell Programming
    A Practical Guide to LinuxR Commands, Editors, and Shell Programming
    ISBN: 131478230
    EAN: N/A
    Year: 2005
    Pages: 213

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net