.\" $Id: nsr_regexp.5,v 1.1 2003/07/11 11:50:56 btompkin Exp $ Copyright (c) 2003, Legato Systems, Inc." .\" Copyright (c) 2003 Legato Systems, Incorporated. .\" All rights reserved. .TH NSR_REGEXP 5 "Aug 23, 06" "StorEdge EBS 7.3.2" .SH NAME nsr_regexp \- regular expression syntax .SH DESCRIPTION This manual page describes the regular expression handling used in Sun StorEdge EBS. The regular expressions recognized are described below. This description is essentially the same as that for .BR ed (1). A regular expression specifies a set of strings of characters. A member of this set of strings is said to be matched by the regular expression. .IP Form Description .IP 1. Any character except a special character matches itself. Special characters are the regular expression delimiter plus a .RB backslash( \e ), .RB brace( [ ), or .RB period( . ) and sometimes a .RB carat( ^ ), .RB asterik( * ), or .RB "dollar symbol(" $ ), depending upon the rules below. .IP 2. A .B . matches any character. .IP 3. A .B \e followed by any character except a digit or a parenthesis matches that character. .IP 4. A nonempty string .BR s , .RB "bracketed string " [s] (or .BR [^s] ) matches any character in (or not in) .BR s . In .BR s , .B \e has no special meaning and .B ] may only appear as the first letter. A substring .BR a-b , with .BR a and b in ascending ASCII order, stands for the inclusive range of ASCII characters. .IP 5. A regular expression of form 1 through 4 followed by .B * matches a sequence of 0 or more matches of the regular expression. .IP 6. A bracketed regular expression .B x of form 1 through 8, .BR \e(x\e) , matches what .B x matches. .IP 7. A .B \e followed by a digit .B n matches a copy of the string that the bracketed regular expression beginning with the .BR n th .B \e(x\e) matched. .IP 8. A regular expression .B x of form 1 through 8 followed by a regular expression .B y of form 1 through 7 matches a match for .B x followed by a match for .BR y , with the .B x match being as long as possible while still permitting a .B y match. .IP 9. A regular expression of form 1 through 8 preceded by .B ^ (or followed by .BR $ ), is constrained to matches that begin at the left (or end at the right) end of a line. .IP 10. A regular expression of form 1 through 9 picks out the longest among the leftmost matches in a line. .IP 11. An empty regular expression stands for a copy of the last regular expression encountered. .SH SEE ALSO .BR ed (1), .BR nsr_client (5).