bug-ed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ed] info ed-File


From: Antonio Diaz Diaz
Subject: Re: [Bug-ed] info ed-File
Date: Tue, 30 May 2017 01:19:54 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14

Hello Kalle,

kalle wrote:
Did you define the corresponding subexpression in RE?

No, I didn't. But I also didn't understand the term "backreference
expression". It should be explained in that part of the info-ed file.

It is explained in the section about regular expressions:
http://www.gnu.org/software/ed/manual/ed_manual.html#Regular-expressions


i)I didn't understand, that s\PATTERN is a special case of
s/RE/REPLACEMENT/, namely by not writing /REPLACEMENT/, so that /RE/ is
deleted. This as other special cases should be explained in the
explanation of `s’.

s\PATTERN is no longer valid in the latest version of ed. The special cases are now explained in the description of 's':

http://www.gnu.org/software/ed/manual/ed_manual.html#Commands
"re and replacement may be delimited by any character other than <space>, <newline> and the characters used by the form of the 's' command shown below. If the last delimiter is omitted, then the last line affected is printed as if the print suffix 'p' were specified. The last delimiter can't be omitted if the 's' command is part of a 'g' or 'v' command-list and is not the last command in the list, because the meaning of the following escaped newline becomes ambiguous. "


iv) as as newbie it is not easy at all for me handling with a
tar.lz-file. I had to research,what the .lz-suffix means,which program
to install, how to use tar and so on. Furthermore, I still don't know
how to deal with binary programs when not installing them through
packaging software. Is it really necessary to point out the newest
version? To .tar.lz the files?

If a problem has been fixed in the latest version, I only see two possibilities; either you install it from source, or you wait until the last version is packaged for your system.


i)in the explanation of the `g' in s/RE/REPLACEMENT/g, it is said that
"It is an error, of no [...]" Why? If N is big enough?

Usually because the RE is not found.


ii)to make a statement to the relation between solely `/RE/' as to jump
to the line and /RE/ in `s/RE/REPLACEMENT/': what does the term search
mean?

Finding the first line that matches /RE/.


That for I also had problems understanding the `r' in `sr'. I think
that for "to be used instead of the that of the last substitution"
"Regular Expression" should be inserted between "the" and "that".That
`//' in also matching the `/RE/' in an `s'-command.

I think this is fixed in the latest version of ed. Please, see the manual at http://www.gnu.org/software/ed/manual/ed_manual.html#Commands

"The 'r' suffix causes the regular expression of the last search to be used instead of that of the last substitution (if the search happened after the substitution)."


*chapter 5,Regular Expressions: "leftmost longest match" is not
really clear, which attribute is more important. I understood it as
the left-most of the longest matches, but obviously it is the longest
of the left-most matches.

Thanks. This was not clear. I have fixed it in the development version and now it states:

"In addition to specifying string literals, regular expressions can
represent classes of strings. Strings thus represented are said to be
matched by the corresponding regular expression. If it is possible for a
regular expression to match several strings in a line, then the
left-most match is the one selected. If the regular expression permits a
variable number of matching characters, the longest sequence starting at
that point is matched."


*what does "nested" mean in the context of "nested subexpression"?

The standard meaning; that a subexpression can contain subexpressions inside it.


* in the '*' part: "or THE subexpression" rather than "or
subexpression" because the last could also mean "or single character
subexpression"

Fixed. Thanks.


*part 'Regular Expressions": change "// repeats last search" into
"//repeats the last used term /RE/" because obviously also the
/RE/-term in substitutions count.

"// repeats last search" is not in "Regular Expressions", but in "Line addressing". In this context it really repeats the last search. But you are right that the null RE should be better documented.


*"\+": "so the regular expression 'a+' is" replace "a+" by "a\+"

Fixed. Thanks.


Best regards,
Antonio.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]