Commit Graph

61 Commits

Author SHA1 Message Date
Nicholas Wilson
5447a395dc Automatic update of doc files #noupdate 2025-02-04 13:03:43 +00:00
MatthewVernon
1dd34dcd23 pcre2grep.1 - fix warning about undefined macro 0 (#673)
Debian's "lintian" picked this up - line 950 in the man page starts
with a ' which is how you start a roff request. You can reproduce the
warning thus:

```
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 \
man --warnings -E UTF-8 -l -Tutf8 -Z doc/pcre2grep.1 >/dev/null
```

The fix is to add a zero-width space (`\&`) to the start of the
relevant line (indeed `groff_man(7)` suggests exactly this use for \&).

---------

Co-authored-by: Matthew Vernon <matthew@debian.org>
2025-02-04 13:02:05 +00:00
Nicholas Wilson
f15bdd334d Update all man page dates #noupdate (#634) 2024-12-18 14:12:58 +00:00
Carlo Marcelo Arenas Belón
0d087cce82 pcre2grep: add $& as an alias for $0 (#519)
Perl does not use $0 anymore to refer to the text of the matched subject
and `pcre2_substitute()` was recently updated to also provide that value
using the variable Perl prefers: `$&`.

In a similar context, either as part of the formatted output from a match
or during the processing of a callback, teach pcre2grep to also populate
$&.

While at it, update the ChangeLog with recent changes.
2024-10-09 09:08:27 +01:00
Nicholas Wilson
32f03ad588 Add option to disable callouts (#499)
* Add option to disable callouts

* Fix pcre2grep issue, and docs

* Add pcre2test docs
2024-10-02 12:00:02 +01:00
Carlo Marcelo Arenas Belón
c63d7c992e pcre2grep: add --posix-pattern-file for compatibility with other grep (#428)
Historically, pcre2grep has done minor processing of the patterns that
were read through the `-f` option.

The end result is that for some patterns there are different results
depending if they were provided through `-e`, `-f` or as a parameter
in the command line.

Add a flag that could be provided to skip that processing so that the
same pattern file used with other grep implementations could be used
directly for the same result.
2024-06-18 15:45:13 +01:00
Philip Hazel
600d752410 Documentation update 2023-12-22 16:17:03 +00:00
Philip Hazel
a0c539392d Doc update; add tests for recent patch; remove unnecessary line in pcre2grep (found by coverity) 2023-11-21 16:43:18 +00:00
Philip Hazel
e179a4b8cc Add --group-separator and --no-group-separator to pcre2grep. 2023-11-20 17:21:17 +00:00
Carlo Marcelo Arenas Belón
1bc34ffa64 pcre2grep: document better possible multiline matching misses (#252)
While at it, remove a misplaced cast that would cause problems for
subjects over 2GB and a few typos.
2023-05-12 15:54:02 +01:00
Carlo Marcelo Arenas Belón
3bbdb6dd71 pcre2grep: avoid UCP mode for \d for compatibility with GNU grep (#222)
Matching multi-byte digits was released with GNU grep 3.9 and considered a
regression that required a couple more releases.

While implementations differ on their interpretation of `\d` under Unicode,
there is a recommendation[1] for a POSIX compatible mode that and a suggestion
that it will be better (safer and faster) to only consider ASCII digits for
that class (and [:digit]).

Use the recently introduced PCRE2_EXTRA_ASCII_BSD if `--posix-digit` is used
together with `-u` or `-U` for compatibility with GNU grep.

[1] https://unicode.org/reports/tr18/
2023-04-11 18:03:06 +01:00
Carlo Marcelo Arenas Belón
71c2748a7b pcregrep: minor documentation update (#208) 2023-02-11 14:31:32 +00:00
Philip Hazel
8385df8c97 Made PCRE2_UCP the default in UTF mode in pcre2grep, and added new options --case-restrict and --no-ucp. 2023-02-08 15:09:18 +00:00
Philip Hazel
7c49b40e8a File and documentation tidies for 10.41 release 2022-12-06 15:53:25 +00:00
Philip Hazel
e653a04473 Update multiple-pattern handling in pcre2grep 2022-11-22 17:52:05 +00:00
Philip Hazel
95e76968ca Improve LCOV coverage statistics and fix bugs that showed up in pcre2grep while doing this. 2022-08-10 16:08:34 +01:00
Philip Hazel
8b133fa0ba Implement -Z in pcre2grep and update documentation 2022-07-30 17:41:49 +01:00
Philip Hazel
d90fb23878 Refactor match_data() to always use the heap instead of having an initial frames vector on the stack; some consequential adjustmentsneeded. 2022-07-27 17:44:55 +01:00
Philip Hazel
31a46200fa Add --allow-lookaround-bsk to pcre2grep 2021-08-31 16:24:25 +01:00
Philip.Hazel
000bbf2ea7 File tidies for 10.36-RC1 2020-11-06 17:27:35 +00:00
Philip.Hazel
81da2b97e3 pcre2grep update: -m and $x{..}, $o{..} escapes. Also some doc updates. 2020-10-04 16:34:31 +00:00
Philip.Hazel
d4e4533240 Fix documentation typos and upgrade documentation checking script. 2020-04-24 16:05:36 +00:00
Philip.Hazel
8b3f8af535 File tidies for 10.35-RC1 release candidate. 2020-04-15 16:34:36 +00:00
Philip.Hazel
9e960f5465 Ensure a newline after the final line in a file is output by pcre2grep. 2020-01-25 15:50:44 +00:00
Philip.Hazel
ae9208ab7b Source tidies (trailing spaces) etc. for 10.34-RC1. 2019-10-17 16:39:38 +00:00
Philip.Hazel
0d1ab8515f Fix pcre2grep -o bug when ovector overflows; add option to adjust the limit;
raise the default limit; give error if -o requests an uncaptured parens.
2019-06-15 15:51:07 +00:00
Philip.Hazel
16d47a9cb1 Documentation update. 2019-05-30 15:43:05 +00:00
Philip.Hazel
4f31de2866 Add support for invalid UTF-8 matching to pcre2grep. 2019-05-28 14:14:22 +00:00
Philip.Hazel
7375089fa5 More file tidies for 10.33-RC1 2019-03-04 18:07:04 +00:00
Philip.Hazel
8187224514 Add VMS support for pcre2grep callout of an external program. 2018-11-24 16:31:10 +00:00
Philip.Hazel
0ad7ff1549 Add --disable-pcre2grep-callout-fork configuration setting. 2018-11-17 16:45:57 +00:00
Philip.Hazel
392974a0cb File tidies and documentation update for 10.32-RC1 Release Candidate. 2018-08-13 11:57:09 +00:00
Philip.Hazel
e75410a5d8 More typos and changes to "Kibibytes" for "Kilobytes". 2018-06-18 14:03:33 +00:00
Philip.Hazel
fabea723cf Typos in documentation and comments noted by Jason Hood. 2018-06-17 14:13:28 +00:00
Philip.Hazel
04919e9d03 Add support to pcre2grep for binary zeros in -f files. 2018-02-24 17:09:19 +00:00
Philip.Hazel
958cd1484f Source tidies and version etc. updates for 10.31-RC1. 2018-01-13 16:53:02 +00:00
Philip.Hazel
2543ba81f7 Fix crash for --line-buffered with a .gz or .bz2 file in pcre2grep. 2017-11-13 17:12:55 +00:00
Philip.Hazel
76e1ce08a6 Documentation update. 2017-10-23 16:57:22 +00:00
Philip.Hazel
40582cf377 Documentation update. 2017-10-11 16:54:22 +00:00
Philip.Hazel
810d9b6da5 Code tidies for 10.30-RC1 release candidate. 2017-07-19 16:04:15 +00:00
Philip.Hazel
76a57bd839 Convert pcre2grep to use new pcre2_compile() options, thereby fixing two minor
(?) bugs.
2017-06-17 11:32:06 +00:00
Philip.Hazel
3d80fa4fc2 Implement PCRE2_NEWLINE_NUL. 2017-05-26 17:14:36 +00:00
Philip.Hazel
14989bd454 Add explicit heap limiting options to pcre2_match(), with associated features
for listing, configuring, etc.
2017-04-11 11:47:25 +00:00
Philip.Hazel
88abc14e42 Jason Hood's pcre2grep patches (modified a bit) to add --output to pcre2grep,
and also an inbuilt callout echo.
2017-04-06 18:02:40 +00:00
Philip.Hazel
0c929b63ad Documentation update. 2017-03-31 17:06:43 +00:00
Philip.Hazel
20cafacaa4 Documentation update. 2017-03-21 12:21:55 +00:00
Philip.Hazel
ca1ecd41a1 File tidies for 10.23-RC1 2017-01-16 17:40:47 +00:00
Philip.Hazel
396a7c7d29 Upgrade pcre2grep for Windows courtesy of Jason Hood. 2016-12-31 17:40:45 +00:00
Philip.Hazel
ee3b0feec0 Documentation update. 2016-10-31 19:04:22 +00:00
Philip.Hazel
1828179ef9 Add -t to pcre2grep. 2016-10-16 16:48:14 +00:00