Sponsored Content
Full Discussion: RegExp - settle a bet
Top Forums UNIX for Dummies Questions & Answers RegExp - settle a bet Post 302186601 by era on Thursday 17th of April 2008 02:23:44 PM
Old 04-17-2008
Concur, the substitution facility is not part of the regular expression formalism proper.

The original implementation of regular expressions was by Ken Thompson in the QED (and later ed) editor. Certainly, there was the s/re/p command in that already then, but his paper on regular expressions describes the "search" part and the underlying mathematical formalism, a concept called "regular sets" which is where the "regular" part in the name comes from.

Ken Thompson - Wikipedia, the free encyclopedia
Regular expression - Wikipedia, the free encyclopedia

K. Thompson, Regular Expression Search Algorithm, Comm. Assoc. Comp. Mach., Vol. 11, 6, pp. 419--422, 1968.

(It's the very first article in his publications list at http://www.cs.bell-labs.com/cm/cs/bib2html/ken.htm)
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No 5 fail. When install Patches. How to settle?

Install 2.6Recommanded on 2 workstations, one works, but the other one has many No 5 fail. the log says: Installing 106361-14... WARNING: /usr/sbin/patchadd is being used to install this patch. Checking installed packages and patches... Executing prepatch script... Verifying... (1 Reply)
Discussion started by: cloudsmell
1 Replies

2. News, Links, Events and Announcements

Microsoft and Sun Settle Litigation

http://www.microsoft.com/presspass/press/2004/apr04/04-02SunAgreementPR.asp no comments sad pressy (1 Reply)
Discussion started by: pressy
1 Replies

3. Programming

how to run prog bet to break points

Hi, I have set two break points at 500 and 572 lines respectively. after running prog using (gdb) run i m on the line 500 but how two go to second breakpoints ie line 572 . when i m giving (gdb) run it is asking again to run from starting lines . (1 Reply)
Discussion started by: useless79
1 Replies

4. Shell Programming and Scripting

script to read a line with spaces bet " " and write to a file

Hi, I need a command in UNIX KSH below is the description... MAPPING DESCRIPTION ="Test Mapping for the calid inputs" ISVALID ="YES" NAME ="m_test_xml" OBJECTVERSION ="1" VERSIONNUMBER ="1" unix ksh command to read the DESCRIPTION and write to a file Test Mapping for the calid inputs... (3 Replies)
Discussion started by: perlamohan
3 Replies

5. UNIX for Dummies Questions & Answers

print the line immediately after a regexp; but regexp is a sentence

Good Day, Im new to scripting especially awk and sed. I just would like to ask help from you guys about a sed command that prints the line immediately after a regexp, but not the line containing the regexp. sed -n '/regexp/{n;p;}' filename What if my regexp is 3 word or a sentence. Im... (3 Replies)
Discussion started by: ownins
3 Replies

6. Shell Programming and Scripting

Find diff bet 2 files and store result in another file

Hi I want to compare 2 files. The files have the same amount of rows and columns. So each line must be compare against the other and if one differs from the other, the result of both must be stored in a seperate file. I am doing this in awk. Here is my file1: Blocks... (2 Replies)
Discussion started by: ladyAnne
2 Replies
shevek::regexp(3)					     Library Functions Manual						 shevek::regexp(3)

NAME
shevek::regexp - Use regular expressions. SYNOPSIS
#include <regexp.hh> Public Member Functions regexp (std::string const &pattern=std::string(), bool case_sensitive=false) Create a new object, and optionally fill it with a pattern. regexp & operator= (std::string const &pattern) Set a pattern, removing the previous one. regexp (regexp const &that) Copy a regexp. regexp & operator= (regexp const &that) Copy a regexp. void case_sensitive (bool value=true) Set whether the evaluation should be case sensitive. ~regexp () Destructor, this cleans up internal structures. bool operator() (std::string const &data) Check whether the pattern matches a string, and fill internal match structures if it does. std::string operator[] (unsigned idx) const Retrieve the value of a subexpression from the last matched string. bool valid (unsigned idx) const Test whether a subexpression was filled by the last matching string. unsigned size () const Get the number of subexpression. std::string transform (std::string const &data) const Transform a string with -codes according to the last matching string. std::string const & pattern () const Get the current pattern. Detailed Description Use regular expressions. Member Function Documentation std::string shevek::regexp::operator[] (unsignedidx) const Retrieve the value of a subexpression from the last matched string. This throws an exception if the subexpression is not valid. Author Generated automatically by Doxygen for libshevek from the source code. libshevek Fri May 11 2012 shevek::regexp(3)
All times are GMT -4. The time now is 07:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy