![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| regexp help | TinCanFury | Shell Programming and Scripting | 0 | 04-06-2008 03:21 PM |
| First US GPL lawsuit to settle out of court - LinuxDevices.com | iBot | UNIX and Linux RSS News | 0 | 09-24-2007 10:40 AM |
| regexp with sed again!!! | andy2000 | Shell Programming and Scripting | 2 | 05-03-2007 07:15 AM |
| Microsoft and Sun Settle Litigation | pressy | News, Links, Events and Announcements | 1 | 04-02-2004 05:55 PM |
| No 5 fail. When install Patches. How to settle? | cloudsmell | UNIX for Dummies Questions & Answers | 1 | 11-06-2002 07:55 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
RegExp - settle a bet
A couple co-workers have a disagreement. Can you guys please settle this?
One co-worker says regular expressions can inherently search and replace. His argument is that he can do a s/ regexp / replace in perl (and many other languages). The other says that by definition regular expressions is just pattern matching and that is an outside function doing the replacing. Thoughts? |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
Its just my thought! |
|
|||
|
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) |
|||
| Google The UNIX and Linux Forums |
| Tags |
| regex, regular expressions |
| Thread Tools | |
| Display Modes | |
|
|