Posted by Ben C on 11/09/07 08:06
On 2007-11-09, rf <rf@invalid.com> wrote:
>
> "mbstevens" <NOXwebmasterx@xmbstevensx.com> wrote in message
> news:13j7hjs9seciva3@corp.supernews.com...
>> Jonathan N. Little wrote:
>>
>>>>>> Where's the 's'?
>>>>> s/jumped/jumps/
>>>>
>>>> I carefully looked at the OP's text and could not see "s/jumped/jumps/"
>>>> anywhere.
>>>>
>>>
>>> Seriously? It's a regular expression substitution "replace 'jumped' with
>>> 'jumps'"
>>>
>> Well, strictly speaking, s///; is a _Perl_ regular expression
>> substitution.
>> I think the popularity of other languages has left a gap in common
>> knowledge of
>> it.
>
> I actually had VI (and its ilk) in mind :-)
I'm sure s/// predates Perl. It probably started in ed (or earlier)
which is how it found its way into vi. Other programs including Perl
copied it because it was what everyone was already used to.
Ticking a box marked "Use Grep" is ironic since "grep" itself is the
name of a different ed command ("global regular expression print"),
which filters rather than substitutes. It should be called "Use Regex".
[Back to original message]
|