Lines Matching full:regular
88 * Extended regexps:: @command{egrep}-style regular expressions
90 * Perl regexps:: Perl-style regular expressions
103 * Regular Expressions:: Overview of regular expression syntax
131 Perl regexps:: Perl-style regular expressions
324 @cindex Extended regular expressions, choosing
325 @cindex @acronym{GNU} extensions, extended regular expressions
326 Use extended regular expressions rather than basic
327 regular expressions. Extended regexps are those that
331 @xref{Extended regexps, , Extended regular expressions}.
338 @cindex Perl-style regular expressions, choosing
339 @cindex @value{SSEDEXT}, Perl-style regular expressions
340 Use Perl-style regular expressions rather than basic
341 regular expressions. Perl-style regexps are extremely
344 Perl-style regular expressions}.
406 * Regular Expressions:: Overview of regular expression syntax
487 @cindex Address, as a regular expression
488 @cindex Line, selecting by regular expression match
489 This will select any line which matches the regular expression @var{regexp}.
493 @cindex empty regular expression
494 @cindex @value{SSEDEXT}, modifiers and the empty regular expression
495 The empty regular expression @samp{//} repeats the last regular
496 expression match (the same holds if the empty regular expression is
497 passed to the @code{s} command). Note that modifiers to regular expressions
498 are evaluated when the regular expression is compiled, thus it is invalid to
499 specify them together with the empty regular expression.
504 @cindex Slash character, in regular expressions
505 This also matches the regular expression @var{regexp},
516 @cindex Perl-style regular expressions, case-insensitive
518 The @code{I} modifier to regular-expression matching is a @acronym{GNU}
527 @cindex Perl-style regular expressions, multiline
528 The @code{M} modifier to regular-expression matching is a @value{SSED}
535 in basic or extended regular expression modes)
547 @cindex Perl-style regular expressions, single line
548 The @code{S} modifier to regular-expression matching is only valid
557 @cindex Perl-style regular expressions, extended
558 The @code{X} modifier to regular-expression matching is also
611 regular expression.
636 @node Regular Expressions
637 @section Overview of Regular Expression Syntax
639 To know how to use @command{sed}, people should understand regular
640 expressions (@dfn{regexp} for short). A regular expression
653 itself. The power of regular expressions comes from the
658 of regular expression syntax as used in @command{sed}.
665 @cindex @acronym{GNU} extensions, to basic regular expressions
667 preceding regular expression, which must be an ordinary character, a
670 postfixed regular expression can also be followed by @code{*}; for
673 the start of a regular expression or subexpression, but many
678 @cindex @acronym{GNU} extensions, to basic regular expressions
682 @cindex @acronym{GNU} extensions, to basic regular expressions
701 @cindex @acronym{GNU} extensions, to basic regular expressions
732 regular expression or subexpression (that is, after @code{\(} or
740 of the regular expression or subexpression (that is, before @code{\)}
773 @cindex @acronym{GNU} extensions, to basic regular expressions
775 parentheses to use complex alternative regular expressions.
783 @code{$}, but less tightly than the other regular expression
788 subexpression in the regular expression. This is called a @dfn{back
806 @cindex Greedy regular expression matching
807 Note that the regular expression matcher is greedy, i.e., matches
971 @cindex Backreferences, in regular expressions
1081 @cindex Perl-style regular expressions, case-insensitive
1083 The @code{I} modifier to regular-expression matching is a @acronym{GNU}
1091 @cindex Perl-style regular expressions, multiline
1093 The @code{M} modifier to regular-expression matching is a @value{SSED}
1100 in basic or extended regular expression modes)
1112 @cindex Perl-style regular expressions, single line
1113 The @code{S} modifier to regular-expression matching is only valid
1122 @cindex Perl-style regular expressions, extended
1123 The @code{X} modifier to regular-expression matching is also
1507 @section @acronym{GNU} Extensions for Escapes in Regular Expressions
1519 extensions, with the exception of @code{\n}. In basic regular
1570 with the @code{o} is active in the normal or extended @sc{posix} regular
1582 regular expressions:
1658 the regular expressions to be matched---this is a common
2524 There are some size limitations in the regular expression
2532 regular expressions.}, assertions, and other types of
2542 regular expressions and those that @option{-R} recognizes.
2688 @cindex @acronym{GNU} extensions, to basic regular expressions
2690 @command{sed} uses the @sc{posix} basic regular expression syntax. According to
2696 As in all @acronym{GNU} programs that use @sc{posix} basic regular
2776 @acronym{GNU} libc's regular expression matcher instead of compiling the
2778 the regular expression @code{^[a-z]$} matches the string @samp{aa},
2806 @appendix Extended regular expressions
2807 @cindex Extended regular expressions, syntax
2809 The only difference between basic and extended regular expressions is in
2811 and braces (@samp{@{@}}). While basic regular expressions require
2813 when using extended regular expressions you must escape them if
2820 becomes @samp{abc\?} when using extended regular expressions. It matches
2824 becomes @samp{c+} when using extended regular expressions. It matches
2828 becomes @samp{a@{3,@}} when using extended regular expressions. It matches
2832 becomes @samp{(abc)@{2,3@}} when using extended regular expressions. It
2836 becomes @samp{(abc*)\1} when using extended regular expressions.
2837 Backreferences must still be escaped when using extended regular
2843 @appendix Perl-style regular expressions
2844 @cindex Perl-style regular expressions, syntax
2847 with the free @sc{pcre} regular expression matcher; it was written by Philip Hazel.}
2849 Perl introduced several extensions to regular expressions, some
2850 of them incompatible with the syntax of regular expressions
2870 You can toggle modifiers in the middle of a regular expression
2876 @cindex Greedy regular expression matching
2928 @cindex Perl-style regular expressions, escaped sequences
2944 @cindex Perl-style regular expressions, backreferences
2991 @cindex Perl-style regular expressions, character classes
3012 @cindex Perl-style regular expressions, assertions
3056 @cindex Perl-style regular expressions, newlines
3082 @cindex Perl-style regular expressions, multiline
3094 @cindex Perl-style regular expressions, multiline
3100 @cindex Perl-style regular expressions, single line
3112 @cindex Perl-style regular expressions, character classes
3137 @cindex Perl-style regular expressions, case-insensitive
3144 @cindex Perl-style regular expressions, single line
3145 @cindex Perl-style regular expressions, multiline
3260 @cindex Perl-style regular expressions, toggling options
3261 @cindex Perl-style regular expressions, case-insensitive
3262 @cindex Perl-style regular expressions, multiline
3263 @cindex Perl-style regular expressions, single line
3264 @cindex Perl-style regular expressions, extended
3339 @cindex Perl-style regular expressions, non-capturing subpatterns
3396 @cindex Perl-style regular expressions, repetitions
3487 @cindex Greedy regular expression matching
3488 @cindex Perl-style regular expressions, stingy repetitions
3546 @cindex Perl-style regular expressions, single line
3578 @cindex Perl-style regular expressions, backreferences
3661 @cindex Perl-style regular expressions, assertions
3662 @cindex Perl-style regular expressions, asserting subpatterns
3672 @cindex Perl-style regular expressions, lookahead subpatterns
3701 @cindex Perl-style regular expressions, lookbehind subpatterns
3727 is permitted, but the apparently equivalent regular expression
3816 @cindex Perl-style regular expressions, non-backtracking subpatterns
3864 @cindex Perl-style regular expressions, lookbehind subpatterns
3908 common: they happen for example in a regular expression
3950 @cindex Perl-style regular expressions, conditional subpatterns
3992 @cindex Perl-style regular expressions, lookahead subpatterns
4015 @cindex Perl-style regular expressions, recursive patterns
4016 @cindex Perl-style regular expressions, recursion
4023 provided an experimental facility that allows regular
4082 @cindex Perl-style regular expressions, comments
4089 @cindex Perl-style regular expressions, extended