This file is indexed.

/usr/share/doc/nedit/html/advancedTopics.html is in nedit 1:5.7-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<HTML>
<HEAD>
<TITLE> Regular Expressions </TITLE>
</HEAD>
<BODY>
<A NAME="Advanced_Topics"></A>
<H2> Advanced Topics </H2>
<P>
<H3>Substitutions</H3>
</P><P>
Regular expression substitution can be used to program automatic editing
operations.  For example, the following are search and replace strings to find
occurrences of the `C' language subroutine `get_x', reverse the first and
second parameters, add a third parameter of NULL, and change the name to
`new_get_x':
</P><P>
<PRE>
     Search string:   `get_x *\( *([^ ,]*), *([^\)]*)\)'
     Replace string:  `new_get_x(\2, \1, NULL)'
</PRE>
</P><P>
<H3>Ambiguity</H3>
</P><P>
If a regular expression could match two different parts of the text, it will
match the one which begins earliest.  If both begin in the same place but
match different lengths, or match the same length in different ways, life
gets messier, as follows.
</P><P>
In general, the possibilities in a list of alternatives are considered in
left-to-right order.  The possibilities for `*', `+', and `?' are considered
longest-first, nested constructs are considered from the outermost in, and
concatenated constructs are considered leftmost-first. The match that will be
chosen is the one that uses the earliest possibility in the first choice that
has to be made.  If there is more than one choice, the next will be made in
the same manner (earliest possibility) subject to the decision on the first
choice.  And so forth.
</P><P>
For example, `(ab|a)b*c' could match `abc' in one of two ways.  The first
choice is between `ab' and `a'; since `ab' is earlier, and does lead to a
successful overall match, it is chosen.  Since the `b' is already spoken for,
the `b*' must match its last possibility, the empty string, since it must
respect the earlier choice.
</P><P>
In the particular case where no `|'s are present and there is only one `*',
`+', or `?', the net effect is that the longest possible match will be
chosen.  So `ab*', presented with `xabbbby', will match `abbbb'.  Note that
if `ab*' is tried against `xabyabbbz', it will match `ab' just after `x', due
to the begins-earliest rule.  (In effect, the decision on where to start the
match is the first choice to be made, hence subsequent choices must respect
it even if this leads them to less-preferred alternatives.)
</P><P>
<H3>References</H3>
</P><P>
An excellent book on the care and feeding of regular expressions is
</P><P>
<PRE>
          Mastering Regular Expressions, 3rd Edition
          Jeffrey E. F. Friedl
          August 2006, O'Reilly &#38; Associates
          ISBN 0-596-52812-4
</PRE>
</P><P>
The first end second editions of this book are still useful for basic
introduction to regexes and contain many useful tips and tricks.
<P><HR>
</P><P>
</P>
</BODY>
</HTML>