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
XML::LibXML::RegExp(3)					User Contributed Perl Documentation				    XML::LibXML::RegExp(3)

NAME
XML::LibXML::RegExp - XML::LibXML::RegExp - interface to libxml2 regular expressions SYNOPSIS
use XML::LibXML; my $compiled_re = XML::LibXML::RegExp->new('[0-9]{5}(-[0-9]{4})?'); if ($compiled_re->isDeterministic()) { ... } if ($compiled_re->matches($string)) { ... } $compiled_re = XML::LibXML::RegExp->new( $regexp_str ); $bool = $compiled_re->matches($string); $bool = $compiled_re->isDeterministic(); DESCRIPTION
This is a perl interface to libxml2's implementation of regular expressions, which are used e.g. for validation of XML Schema simple types (pattern facet). new() $compiled_re = XML::LibXML::RegExp->new( $regexp_str ); The constructor takes a string containing a regular expression and returns a compiled regexp object. matches($string) $bool = $compiled_re->matches($string); Given a string value, returns a true value if the value is matched by the compiled regular expression. isDeterministic() $bool = $compiled_re->isDeterministic(); Returns a true value if the regular expression is deterministic; returns false otherwise. (See the definition of determinism in the XML spec (<http://www.w3.org/TR/REC-xml/#determinism>)) AUTHORS
Matt Sergeant, Christian Glahn, Petr Pajas VERSION
2.0110 COPYRIGHT
2001-2007, AxKit.com Ltd. 2002-2006, Christian Glahn. 2006-2009, Petr Pajas. LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2014-02-01 XML::LibXML::RegExp(3)
All times are GMT -4. The time now is 08:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy