Having this manual help me find all strings in file which looks like this:
endpoint = '...'
I need to get only ... part
Options and arguments:
-E, --extended-regexp
Interpret patterns as extended regular expressions (EREs). This is
the default.
-e PATTERN, --regexp=PATTERN
Specify a PATTERN used during the search of the input: an input
line is selected if it matches any of the specified patterns.
Note that longer patterns take precedence over shorter patterns.
This option is most useful when multiple -e options are used to
specify multiple patterns, when a pattern begins with a dash (`-'),
to specify a pattern after option -f or after the FILE arguments.
-G, --basic-regexp
Interpret patterns as basic regular expressions (BREs), i.e. make
ugrep behave as traditional grep.
-N PATTERN, --neg-regexp=PATTERN
Specify a negative PATTERN used during the search of the input: an
input line is selected only if it matches the specified patterns
unless it matches the negative PATTERN. Same as -e (?^PATTERN).
Negative pattern matches are essentially removed before any other
patterns are matched. Note that longer patterns take precedence
over shorter patterns. This option may be repeated.
-P, --perl-regexp
Interpret PATTERN as a Perl regular expression using PCRE2.
Note that Perl pattern matching differs from the default grep POSIX
pattern matching.
-w, --word-regexp
The PATTERN is searched for as a word, such that the matching text
is preceded by a non-word character and is followed by a non-word
character. Word characters are letters, digits and the
underscore. With option -P, word characters are Unicode letters,
digits and underscore. This option has no effect if -x is also
specified. If a PATTERN is specified, or -e PATTERN or -N PATTERN,
then this option has no effect on -f FILE patterns to allow -f FILE
patterns to narrow or widen the scope of the PATTERN search.
-x, --line-regexp
Select only those matches that exactly match the whole line, as if
the patterns are surrounded by ^ and $. If a PATTERN is specified,
or -e PATTERN or -N PATTERN, then this option has no effect on
-f FILE patterns to allow -f FILE patterns to narrow or widen the
scope of the PATTERN search.
Related options:
--filter-magic-label=[+]LABEL:MAGIC
Associate LABEL with files whose signature "magic bytes" match the
MAGIC regex pattern. Only files that have no filename extension
are labeled, unless +LABEL is specified. When LABEL matches an
extension specified in --filter=COMMANDS, the corresponding command
is invoked. This option may be repeated.
--help [WHAT], -? [WHAT]
Display a help message on options related to WHAT when specified.
In addition, `--help regex' displays an overview of regular
expressions, `--help globs' displays an overview of glob syntax and
conventions. `--help fuzzy' displays details of fuzzy search with
option -Z and `--help format' displays a list of --format fields.
-M MAGIC, --file-magic=MAGIC
Only files matching the signature pattern MAGIC are searched. The
signature "magic bytes" at the start of a file are compared to
the MAGIC regex pattern. When matching, the file will be searched.
When MAGIC is preceded by a `!' or a `^', skip files with matching
MAGIC signatures. This option may be repeated and may be combined
with options -O and -t to expand the search. Every file on the
search path is read, making searches potentially more expensive.
Extended regular expression syntax overview (excludes some advanced patterns):
pattern matches pattern removes special meaning
. any character except \n . escapes . to match .
a the character a \Q...\E the literal string ...
ab the string ab --------------------------------------
a|b a or b
a* zero or more a's pattern special characters
a+ one or more a's ---------- --------------------------
a? zero or one a \f form feed
a{3} 3 a's \n newline
a{3,} 3 or more a's \r carriage return
a{3,7} 3 to 7 a's \R any Unicode line break
a*? zero or more a's lazily \t tab
a+? one or more a's lazily \v vertical tab
a?? zero or one a lazily \X any character and \n
a{3}? 3 a's lazily \cZ control character ^Z
a{3,}? 3 or more a's lazily \0 NUL
a{3,7}? 3 to 7 a's lazily \0ddd octal character code ddd
-------------------------------------- \xhh hex character code hh
\x{hex} hex Unicode code point
pattern character classes \u{hex} hex Unicode code point
[abc-e] one character a,b,c,d,e
[^abc-e] one char not a,b,c,d,e,\n pattern anchors and boundaries
[[:name:]] one char in POSIX class: ---------- --------------------------
alnum a-z,A-Z,0-9 ^ begin of line anchor
alpha a-z,A-Z $ end of line anchor
ascii ASCII char \x00-\x7f \b word boundary (-P)
blank space or tab \B non-word boundary (-P)
cntrl control characters < start word boundary (-P)
digit 0-9 > end word boundary (-P)
graph visible characters (?=...) lookahead (-P)
lower a-z (?!...) negative lookahead (-P)
print visible chars and space (?<=...) lookbehind (-P)
punct punctuation characters (?<!...) negative lookbehind (-P)
space space,\t,\n,\v,\f,\r --------------------------------------
upper A-Z
word a-z,A-Z,0-9,_ pattern grouping
xdigit 0-9,a-f,A-F ---------- --------------------------
\p{class} one character in class (...) capturing group (-P)
\P{class} one char not in class (...) non-capturing group
\d a digit (?:...) non-capturing group
\D a non-digit (?...) capturing, named X (-P)
\h a space or tab \1 matches group 1 (-P)
\H not a space or tab \g{10} matches group 10 (-P)
\s a whitespace except \n \g{X} matches group name X (-P)
\S a non-whitespace (?#...) comments ... are ignored
\w a word character --------------------------------------
\W a non-word character
-------------------------------------- (-P): pattern requires option -P
Option -P enables Perl regex matching, supporting Unicode patterns, Unicode
word boundary matching (\b, \B, <, >), lookaheads and capturing groups.
Option -U disables full Unicode pattern matching: non-POSIX Unicode character
classes \p{class} are disabled, ASCII, LATIN1 and binary regex patterns only.
Option --bool adds the following operations to regex patterns a' and b':
pattern operation pattern operation
(...) grouping "..." the literal string ...
-a logical not a NOT a locical not a
a|b logical a or b a OR b logical a or b
a b logical a and b a AND b locical a and b
Listed from the highest level of precedence to the lowest, NOT is performed
before OR and OR is performed before AND. Thus, -x|y z' is ((-x)|y) z'.
Spacing with --bool logical operators and grouping is recommended. Parenthesis
become part of the regex sub-patterns when nested and when regex operators are
directly applied to a parenthesized sub-expression. For example, ((x y)z)' matches x yz' and likewise ((x y){3} z)' match three x y' and a `z'.
The default is to match lines satisfying the --bool query. To match files,
use option --files with --bool. See also options --and, --andnot, --not.
Option --stats displays the options and patterns applied to the matching files.