Match a String of Characters () () ( n )

team bbl


Match a String of Characters (+) (*) ( { n} )

You can match a string of one or more characters by adding a plus (+) after the character.

You can match a string of zero or more characters by adding an asterisk (*) after the character.

You can match a string of a specified number of characters by adding curly brackets enclosing a number ({ n} ) after the character.

You can specify a range of repetitions with two numbers enclosed in curly brackets.

Regular Expression

Match

Not a Match

ab+c

abc, abbbc, abbbbc

ac, axc

ab*c

ac, abc, abbbc

axc

ab{ 3} c

abbbc

abc, abbc, abbbbbc

ab(2,3} c

abbc, abbbc

ac, abc, abbbbbc

a[bc]+d

abd, acccd, abccbd

ad, axd

a(bc)*d

ad, abcd, abcbcbcd

abd, acd, axd

^.+$

a, aaa (any line with one or more characters in it)

(a blank line)


    team bbl



    Spring Into Linux
    Spring Into Linux
    ISBN: 0131853546
    EAN: 2147483647
    Year: 2005
    Pages: 362
    Authors: Janet Valade

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