If a right square bracket is immediately after a left square bracket, it does Its special meaning if it's the first (after an initial ^, if any) or last character However, matches x, y, or z, but not a, b, or c.Ī minus sign (-) within square brackets indicates a range of consecutive ASCIIĬharacters. For example, matches a, b, or c,īut not x, y, or z. If the first character in the brackets is a caret ( ^), it matchesĪny character except those in the string. Treats it as one expression and applies any asterisk ( *) or plus ( )Ī string of characters enclosed in square brackets ( ) matches any one character If an expression is enclosed in parentheses ( ( and )), the editor Its own this isn't much use, but in the middle of a longer regular So to match any series of zero or more characters, use ". One occurrence of the one-character regular expression. If there is anyĬhoice, the first matching string in a line is used.Ī regular expression followed by a question mark ( ?) matches zero or Occurrences of the one-character regular expression. If there is any choice, theĪ regular expression followed by a plus sign ( ) matches one or more You can repeat expressions with an asterisk or plus sign.Ī regular expression followed by an asterisk ( *) matches zero or more To match a special character, precede it with a backslash, like this \*.Ī period (.) matches any character except a newline character. (often the man pages for UNIX utilities) is available by using one The information here is an amalgamation of the documentation of regularĮxpressions in the Metrowerks CodeWarrior IDE, and of a chapter in theīook UNIX Power Tools (Peek, O'Reilly
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |