Home Man
Today's Posts

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:
Select Section of Man Page:
Select Man Page Repository:

OpenSolaris 2009.06 - man page for regcmp (opensolaris section 1)

regcmp(1)				  User Commands 				regcmp(1)

       regcmp - regular expression compile

       regcmp [-] filename...

       The regcmp command performs a function similar to regcmp and, in most cases, precludes the
       need for calling regcmp from C programs. Bypassing regcmp saves on both execution time and
       program	size.  The command regcmp compiles the regular expressions in filename and places
       the output in filename.i.

       -	If the - option is used, the output  is  placed  in  filename.c.  The  format  of
		entries  in  filename  is a name (C variable) followed by one or more blanks fol-
		lowed by one or more regular expressions enclosed in double quotes. The output of
		regcmp	is  C source code. Compiled regular expressions are represented as extern
		char vectors. filename.i files may thus be #included in C programs, or filename.c
		files  may  be	compiled  and later loaded. In the C program that uses the regcmp
		output, regex(abc,line) applies the regular expression named abc to  line.  Diag-
		nostics are self-explanatory.

       Example 1 Examples of the regcmp command.

       name	"([A-Za-z][A-Za-z0-9_]*)$0"

       telno	"\({0,1}([2-9][01][1-9])$0\){0,1} *"

		"([2-9][0-9]{2})$1[ -]{0,1}"


       The three arguments to telno shown above must all be entered on one line.

       In the C program that uses the regcmp output,

	      regex(telno, line, area, exch, rest)

       applies the regular expression named telno to line.

       A  general  description	of  the usage of the LC_* environmental variables can be found in

       LC_CTYPE        Determines how regcmp handles characters. When LC_CTYPE is set to a  valid
		       value,  regcmp  can display and handle text and filenames containing valid
		       characters for that locale.

       LC_MESSAGES     Determines how diagnostic and informative  messages  are  presented.  This
		       includes  the  language and style of the messages, and the correct form of
		       affirmative and negative responses.  In the "C" locale, the  messages  are
		       presented  in the default form found in the program itself (in most cases,
		       U.S. English).

       See attributes(5) for descriptions of the following attributes:

       |      ATTRIBUTE TYPE	     |	    ATTRIBUTE VALUE	   |
       |Availability		     |SUNWtoo			   |
       |CSI			     |Enabled			   |

       regcmp(3C), attributes(5), environ(5)

SunOS 5.11				   Dec 20 1996					regcmp(1)

All times are GMT -4. The time now is 01:31 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password

Not a Forum Member?
Forgot Password?