Full Code of aureliojargas/txt2regex for AI

main 0f4199127225 cached
29 files
335.7 KB
104.6k tokens
1 requests
Download .txt
Showing preview only (349K chars total). Download the full file or copy to clipboard to get everything.
Repository: aureliojargas/txt2regex
Branch: main
Commit: 0f4199127225
Files: 29
Total size: 335.7 KB

Directory structure:
gitextract_8nv6xu98/

├── .devcontainer/
│   └── devcontainer.json
├── .github/
│   └── workflows/
│       └── check.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── COPYRIGHT
├── Makefile
├── README.md
├── TODO
├── man/
│   ├── txt2regex.html
│   ├── txt2regex.man
│   └── txt2regex.t2t
├── po/
│   ├── ca.po
│   ├── de_DE.po
│   ├── es_ES.po
│   ├── fr_FR.po
│   ├── id_ID.po
│   ├── it_IT.po
│   ├── ja.po
│   ├── pl_PL.po
│   ├── pt_BR.po
│   ├── ro_RO.po
│   ├── tr.po
│   └── txt2regex.pot
├── tests/
│   ├── Dockerfile
│   ├── cmdline.md
│   ├── features.md
│   ├── regex-tester.sh
│   └── regex-tester.txt
└── txt2regex.sh

================================================
FILE CONTENTS
================================================

================================================
FILE: .devcontainer/devcontainer.json
================================================
// https://aka.ms/devcontainer.json
{
    "name": "txt2regex dev",
    "image": "ghcr.io/aureliojargas/devcontainer",
    //
    // https://aka.ms/vscode-remote/containers/non-root
    "remoteUser": "vscode",
    //
    // https://github.com/devcontainers/features/tree/main/src
    "features": {
        "github-cli": "latest",
        // Some Makefile commands are run inside a Docker container
        "docker-in-docker": "latest"
    }
}


================================================
FILE: .github/workflows/check.yml
================================================
# https://docs.github.com/en/actions/reference

name: Check
on:
  push:
  pull_request:
jobs:

  lint:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v2
      - run: sudo snap install shfmt
      - run: make lint

  test:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v2
      # See https://github.com/aureliojargas/txt2regex/pull/9 on why we're
      # using env in the next command
      - run: env --default-signal=PIPE make test
      - run: make test-bash
      - run: make test-regex

      - name: The repository must remain unchanged after the checks
        run: |
          git diff
          git diff-index --exit-code HEAD


================================================
FILE: CHANGELOG.md
================================================
# Changelog for txt2regex

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog].

[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/

[Unreleased]: https://github.com/aureliojargas/txt2regex/compare/v0.9...HEAD
[Version 0.9]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.9
[Version 0.8]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.8
[Version 0.7]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.7
[Version 0.6]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.6
[Version 0.5]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.5
[Version 0.4]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.4
[Version 0.3.1]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.3.1
[Version 0.3]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.3
[Version 0.2]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.2
[Version 0.1]: https://github.com/aureliojargas/txt2regex/releases/tag/v0.1

[#12]: https://github.com/aureliojargas/txt2regex/pull/12
[#9]: https://github.com/aureliojargas/txt2regex/pull/9
[#7]: https://github.com/aureliojargas/txt2regex/pull/7
[#6]: https://github.com/aureliojargas/txt2regex/pull/6
[#5]: https://github.com/aureliojargas/txt2regex/pull/5
[#3]: https://github.com/aureliojargas/txt2regex/pull/3

[307ae9a]: https://github.com/aureliojargas/txt2regex/commit/307ae9a
[d0c6254]: https://github.com/aureliojargas/txt2regex/commit/d0c6254
[bee846a]: https://github.com/aureliojargas/txt2regex/commit/bee846a
[dbcd055]: https://github.com/aureliojargas/txt2regex/commit/dbcd055
[f1d80c9]: https://github.com/aureliojargas/txt2regex/commit/f1d80c9
[0a7127a]: https://github.com/aureliojargas/txt2regex/commit/0a7127a
[1660d83]: https://github.com/aureliojargas/txt2regex/commit/1660d83
[61abe24]: https://github.com/aureliojargas/txt2regex/commit/61abe24
[3a3fd24]: https://github.com/aureliojargas/txt2regex/commit/3a3fd24
[8e1f6ea]: https://github.com/aureliojargas/txt2regex/commit/8e1f6ea
[4b98e2b]: https://github.com/aureliojargas/txt2regex/commit/4b98e2b
[f5d0125]: https://github.com/aureliojargas/txt2regex/commit/f5d0125
[d7850d2]: https://github.com/aureliojargas/txt2regex/commit/d7850d2
[f323926]: https://github.com/aureliojargas/txt2regex/commit/f323926
[190906c]: https://github.com/aureliojargas/txt2regex/commit/190906c
[2768584]: https://github.com/aureliojargas/txt2regex/commit/2768584
[4b41298]: https://github.com/aureliojargas/txt2regex/commit/4b41298
[7a1b0cb]: https://github.com/aureliojargas/txt2regex/commit/7a1b0cb
[674d7bb]: https://github.com/aureliojargas/txt2regex/commit/674d7bb
[bee220c]: https://github.com/aureliojargas/txt2regex/commit/bee220c
[a3f7fef]: https://github.com/aureliojargas/txt2regex/commit/a3f7fef
[c084ed8]: https://github.com/aureliojargas/txt2regex/commit/c084ed8


## [Unreleased]

### Added

- CI: Now also run the tests for Bash version 5.1 [307ae9a]

### Changed

- CI: Moved from Travis CI to GitHub Actions [#9]

### Fixed

- Fixed to work properly in Bash 5.2 (thanks Nick Rosbrook) [#12]


## [Version 0.9] released in 2020-05-21

### Added

- Added CHICKEN Scheme regexes (thanks Mario Domenech Goulart)
  [dbcd055], [f1d80c9]
- New tests for all the command line options (`tests/cmdline.md`)
- New tests for txt2regex features (`tests/features.md`) [#5]
- New regex tester that runs the supported programs in a Docker
  container. Using specially crafted regexes, it verifies how the
  programs behave in "real life". This avoids manual testing or reading
  the program documentation to get regex-related information
  (`tests/regex-tester.sh`) [#6]
- New automatic testing in all Bash versions from 3.0 to 5.0, to make
  sure txt2regex works in all of them (`make test-bash`)
- Now using Travis CI to run all the tests at every push to the GitHub
  repository
- New Makefile targets to perform common tasks: `check`, `fmt`,
  `install-bin`, `install-mo`, `lint`, `test`, `test-bash`,
  `test-regex`, `test-regex-build`, `test-regex-shell`
- Added short options `-h` (for `--help`) and `-V` (for `--version`)
  [0a7127a], [1660d83]

### Removed

- Removed Lisp regexes (choose Emacs and/or CHICKEN Scheme instead)
- Removed OpenOffice.org regexes (not supported by the new regex tester)
- Removed VBScript regexes (not supported by the new regex tester)
- Removed the old regex tester `test-suite/*`
- Removed `tools/bashdump-rmdup.sh` since `msguniq` has the same
  functionality
- Removed the NEWS file for not adding too much value over the changelog

### Changed

- Bumped minimal required Bash version from 2.04 to 3.0 [d0c6254]
- Bumped the versions for all the supported programs [#7]
- Validated and updated the regex data for all the supported programs,
  thanks to the new regex tester. Some programs now support new
  metacharacters, while others got updates on the escaping rules and
  POSIX character classes support [#7]
- JavaScript regexes: now using Node.js instead of Netscape [61abe24]
- lex regexes: now using GNU flex [3a3fd24]
- PHP regexes: switch from old `ereg` to `preg` (PCRE) [8e1f6ea]
- Changed the default programs: +egrep +grep +emacs -perl -php -postgres
- Remove repeated characters inside a list `[]` (if the user has typed
  `abbbca`, make it `[abc]`) [4b98e2b]
- Now `--showmeta` also shows the version for each program [d7850d2]
- Now the "!! not supported" legend only appears when there are
  unsupported metacharacters in the current regex [f323926]
- Converted everything (code, docs, translations) to UTF-8
- Improved the source code quality (`shellcheck`) and formatting
  (`shfmt`)
- Unset `$PATH` in the top of the script to make sure only Bash builtin
  commands are used [bee846a]
- Simplified the man page contents [f5d0125]
- i18n: Improve some translatable strings to make them shorter and
  easier to translate
- Moved the project hosting from SourceForge to GitHub
- Converted this changelog to the [Keep a Changelog] format

### Fixed

- Fixed to work properly in bash5 (thanks Yanmarshus Bachtiar) [190906c]
- Fixed `eval` bug when running in bash3 or newer (thanks Marcus
  Habermehl) [2768584]
- Fixed incorrect metacharacters for `?` and `+` showing up for `vi` in
  `--showmeta` and `--showinfo` [c084ed8]
- Fixed the escaping of the `}` character to be matched as a literal
- Fixed the escaping of the `\` character to be matched as a literal,
  for programs that use `\\` for escaping: before: `\\\`, now: `\\\\`
  [4b41298]
- Fixed the escaping of the `\` character when inside a list `[]`
  [a3f7fef]
- Fixed the handling of the `[` character when inside a list `[]`: it is
  not special at all and should not be handled [7a1b0cb]
- Fixed the handling of the `^` character when inside a list `[]`: only
  move it to the end when it is in the first position [674d7bb]
- Fixed the handling of the `-` character when inside a list `[]`: do
  not move it to the end when it is in the first position, since it is
  not special there [bee220c]

### Translations

- Added Turkish translations provided by erayalakese [#3]
- Added Catalan translations provided by Carles (ChAoS)
- Added French translations provided by wwp

## [Version 0.8] released in 2004-09-28

### Added

- Added OpenOffice.org regexes support

### Changed

- Documentation updated: cleaner README and new man page contents

### Fixed

- Fixed bash version test, now works on bash 3.0 and newer (thanks Rene
  Engelhard)
- Fixed sed script bug on `procmail-re-test` (thanks JulioB @ caltech)

### Translations

- Added Romanian translations provided by Robert Claudiu Gheorghe
- Added Spanish translations provided by Diego Moya Velázquez
- Added Italian translations provided by Daniele Pizzolli and
  revised by Marco Pagnanini

## [Version 0.7] released in 2002-03-04

### Added

- Groups are now quantifiable, i.e. `(foo|bar){1,5}`
- New option `--prog` to choose which programs to show the regexes for
- New option `--make` to automatically compose regexes for common
  patterns: date, hour, number
- New option `--version` to show the txt2regex version
- Added the "Really quit?" confirmation (thanks Martin Butterwecki)
- Added man page (thanks Martin Butterwecki)

### Fixed

- Fixed Makefile bug on `DESTDIR` (thanks Martin Butterwecki)

### Translations

- Added Japanese translations provided by Hajime Dei

## [Version 0.6] released in 2001-09-05

- Added (group|and|alternation) support
- Added groups balance check -> `(((3)))`
- Added MySQL regexes support
- Option `--history` now supports all the txt2regex features
- Added German translations provided by Jan Parthey

## [Version 0.5] released in 2001-08-28

- New option `--showmeta` to print a complete metacharacters table
- New option `--showinfo` to print regex-related information about a
  program

## [Version 0.4] released in 2001-08-02

- Added JavaScript regexes support
- Added PostgreSQL regexes support
- Added procmail regexes support
- Added VBScript regexes support
- New `procmail-re-test` utility to test the procmail regexes from the
  command line
- Test-suite improved and now included on the tarball
- Updated Polish translations

## [Version 0.3.1] released in 2001-06-26

- Now using a custom `sek()` function instead of the `seq` command, thus
  removing the last external (non-bash-builtin) command from txt2regex
- Updated Indonesian translation
- Updated Polish translation

## [Version 0.3] released in 2001-06-13

- Added support for localized POSIX character classes `[[:abc:]]`
- Added support for special user combinations inside lists `[]`
- New option `--whitebg` to adjust the colors for white background
  terminals
- Improve the final human sentence with more detailed data
- Remove the usage of the `clear` and `stty` commands, because they are
  not Bash builtin commands (and txt2regex strives to be 100% Bash
  builtins powered)
- The project is now hosted at SourceForge
- Added Polish translations provided by Chris Piechowicz

## [Version 0.2] released in 2001-04-24

- Changed project name from txt2regexp to txt2regex
- New option `--history` to "replay" from history data a regex
  previously composed in txt2regex
- New option `--nocolor` to not use colors in the interface
- New dynamic history for user input:
  `.oO(history)(¤user_input1¤userinput2¤...)`
- Added Indonesian (Bahasa) translations provided by Muhamad Faizal

## [Version 0.1] released in 2001-02-23

- Initial release (as txt2regexp)


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to txt2regex

Please follow the usual GitHub workflow to contribute to this project:

- Use [GitHub issues](https://github.com/aureliojargas/txt2regex/issues) for bug reports and feature requests.

- Use GitHub pull requests to submit code and translations.

## Guidelines

The following guidelines are reminders for the future me (the author), because I cannot hold all of that information in my head. You, as a contributor, are not required to follow them (but thanks if you do).

- Keep the current code style (even if you find it odd)

- Keep the code formatted (`make fmt`) and validated (`make lint`)

- Do not use any system command, this is a Bash builtins script

- Do not use any Bash feature that is not supported by the old minimal version txt2regex supports (see https://mywiki.wooledge.org/BashFAQ/061)

- Do not use `echo`, use `printf`

- Always use `[` instead of `test` in `txt2regex.sh`

- Use `-eq` and `-ne` instead of `==` and `!=` for numeric tests

- Use `-n` and `-z` when testing variables for emptiness

- Always use `$"..."` for strings that the user will see (i18n)

- Think about translations, keep strings short and direct

- Update the man page when there are relevant changes

- Update the Changelog when there are relevant changes

- New files should always be UTF-8

## Testing

All tests must always be successful. The CI will refuse changes that break tests.

- Add/update tests in `tests/*.md` when adding/updating features

- Make sure all the tests are passing: `make test`

- Make sure it's working in all the supported Bash versions: `make test-bash`

- When touching the regex tester, run it (`make test-regex`) and check the `regex-tester.txt` contents for changes

- Do some manual testing to make sure the interactive usage is ok

## Releasing

- Make sure all the tests are passing (see previous topic)

- Make sure the manual page contents is up-to-date with the current code and regenerate it with `make doc`

- Make sure the Changelog is up-to-date, containing all the relevant changes since the last released version

- In the `TODO` file, is there anything to be added/removed?

- In the `README.md` file, is there anything to be added/removed?

- Update the `po/*.{po,pot}` files to match the current code: run `make po` and commit

- Create the official release commit:

  - Update the version number in `txt2regex.sh` and `Makefile`
  - Update the version number in `tests/cmdline.md`
  - Update the version number and creation date in the potfile: `make pot`
  - Update the man page date to the release date and regenerate it: `make doc`
  - Update the changelog with the version number and release date
    - Remember to update the "compare" links at the top
  - Rerun the tests, just in case: `make check`
  - Commit
  - Tag this commit with the version number
  - Example: https://github.com/aureliojargas/txt2regex/commit/be3e0fa

- Publish the release: `git push && git push --tags`

- Get back to the development version:
  - Update the version number in `txt2regex.sh` and `Makefile`
    - Use `version+1` and add the `b` suffix (for beta)
  - Example: https://github.com/aureliojargas/txt2regex/commit/193c011

## History rewrite

In 2020-05-19 the whole Git history for this repository was rewritten. It was necessary to set the correct date for the initial commits, so they reflect the official release date for the releases.

Before:

    699db55 2012-12-21  adding txt2regex version 0.1 (2001-02-23)
    fb48115 2012-12-21  Revert "adding txt2regex version 0.1 (2001-02-23)"
    1a45c22 2012-12-21  add txt2regex version 0.1 (2001-02-23)
    961f8fa 2012-12-21  Program renamed from txt2regexp to txt2regex
    f4ac6e7 2012-12-21  Add txt2regex version 0.2 (2001-04-24)
    4c037d1 2012-12-21  Renamed file: id.po => id_ID.po
    7c4de30 2012-12-21  Add txt2regex version 0.3 (2001-06-13)
    5d56afd 2012-12-21  Add txt2regex version 0.3.1 (2001-06-26)
    92c7677 2012-12-21  Add txt2regex version 0.4 (2001-08-02)
    cd23c57 2012-12-21  Add txt2regex version 0.5 (2001-08-28)
    4b572b5 2012-12-21  Add txt2regex version 0.6 (2001-09-05)
    20ac0f5 2012-12-21  Add txt2regex version 0.7 (2002-03-04)
    6fe0ae8 2012-12-21  Add txt2regex version 0.8 (2004-09-28)
    3bbfa3b 2012-12-21  Add txt2regex version 0.9 beta (unreleased)

After:

    f17f458 2001-02-22  Initial commit
    2f066eb 2001-02-22  Remove empty README
    eff18e0 2001-02-23  Add txt2regex version 0.1 (2001-02-23)
    5f685c5 2001-04-24  Program renamed from txt2regexp to txt2regex
    da3e729 2001-04-24  Add txt2regex version 0.2 (2001-04-24)
    db8a71e 2001-06-13  Renamed file: id.po => id_ID.po
    6fa7545 2001-06-13  Add txt2regex version 0.3 (2001-06-13)
    98c60e8 2001-06-26  Add txt2regex version 0.3.1 (2001-06-26)
    f2acfd3 2001-08-02  Add txt2regex version 0.4 (2001-08-02)
    bdd05d1 2001-08-28  Add txt2regex version 0.5 (2001-08-28)
    7e9159f 2001-09-05  Add txt2regex version 0.6 (2001-09-05)
    b8b618a 2002-03-04  Add txt2regex version 0.7 (2002-03-04)
    8d96c9a 2004-09-28  Add txt2regex version 0.8 (2004-09-28)
    2768584 2012-12-21  Add txt2regex version 0.9 beta (unreleased)

Note that the initial commit was also fixed, instead of the old weird revert.

All of the existing Git tags (`v0.1`, `v0.2`, ...) were updated to point to the new commits.

Another change in this rewrite was the removal (not the revert) of the commit that added the `releases/` folder with all the `.tgz` files from all the releases (until v0.8):

    2a113fe 2013-09-22  Add new 'releases' folder with TGZ files

That was a bad idea. GitHub already provides automatic `.zip` and `.tar.gz` files for every tagged commit. Since all of those first commits were created by expanding the tarballs from the official releases, the GitHub ones should be equal.

The old `master` branch was saved as the `master-until-2020-05-19` branch.

All the pull requests until number 7 are now referencing not the `master` commits, but those in the `master-until-2020-05-19` branch.

I know this is a total mess. I'm sorry for that. But I think having the official dates for the commits of the old versions is important. Now the "Releases" listing in GitHub has the correct dates.


================================================
FILE: COPYRIGHT
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.


================================================
FILE: Makefile
================================================
NAME = txt2regex
VERSION = 0.10b
BASHVERSIONS = 3.0 3.1 3.2 4.0 4.1 4.2 4.3 4.4 5.0 5.1
REGEXTESTERIMAGE = aureliojargas/regex-tester:2020-05-09

SCRIPT = $(NAME).sh
PODIR = po
POTFILE = $(PODIR)/$(NAME).pot

DESTDIR =
BINDIR = $(DESTDIR)/usr/bin
LOCALEDIR = $(DESTDIR)/usr/share/locale
MANDIR = $(DESTDIR)/usr/share/man/man1

.PHONY: check check-po clean doc fmt install install-bin \
        install-mo lint mo po pot test test-bash test-regex \
        test-regex-build test-regex-shell

#-----------------------------------------------------------------------
# Dev

check: lint test

fmt:
	shfmt -w -i 4 -ci -sr $(SCRIPT) tests/regex-tester.sh

lint:
	shellcheck $(SCRIPT) tests/regex-tester.sh
	shfmt -d -i 4 -ci -sr $(SCRIPT) tests/regex-tester.sh

test: clitest.sh
	sh clitest.sh --progress none README.md tests/*.md

# Run the tests in multiple Bash versions, using the official Docker
# image https://hub.docker.com/_/bash (each image is ~10MB).
# Early exit the loop in the first error, otherwise only the last loop
# iteration would count as the exit state for this target.
test-bash: clitest.sh
	@for v in $(BASHVERSIONS); do \
		printf '\nTesting in Bash version %s\n' $$v; \
		docker run --rm -v $$PWD:/code -w /code bash:$$v \
			sh clitest.sh --progress none tests/*.md || exit 1; \
	done

# Run regex tests for the supported programs, inside a Docker container
test-regex:
	# Explicit pull to make sure all the log messages from the pulling
	# process appear here, and not when executing the next "docker run",
	# whose output goes directly to the .txt file.
	docker image inspect $(REGEXTESTERIMAGE) >/dev/null 2>&1 || \
	docker pull $(REGEXTESTERIMAGE)

	# Test all programs except "vi"
	docker run --rm -v "$$PWD":/code -w /code $(REGEXTESTERIMAGE) \
		tests/regex-tester.sh --skip vi > tests/regex-tester.txt 2>&1

	# vi: no stderr redirect to avoid "inappropriate ioctl for device"
	# vi: docker run -t adds a trailing \r to every line :/
	docker run --rm -v "$$PWD":/code -w /code -t $(REGEXTESTERIMAGE) \
		tests/regex-tester.sh vi | tr -d '\r' >> tests/regex-tester.txt

test-regex-shell:
	docker run --rm -v "$$PWD":/code -w /code -it $(REGEXTESTERIMAGE)

test-regex-build:
	docker build -t $(REGEXTESTERIMAGE) tests/

clean:
	rm -f $(NAME) clitest.sh txt2tags.py messages.mo tmp.lex.*
	rm -f $(PODIR)/messages $(PODIR)/*.mo $(PODIR)/*.tmp $(PODIR)/*~
	rm -rf $(PODIR)/??/ $(PODIR)/??_??/

doc: txt2tags.py
	python3 ./txt2tags.py -t man  man/txt2regex.t2t
	python3 ./txt2tags.py -t html man/txt2regex.t2t

clitest.sh:
	curl -s -L -o $@ \
	https://raw.githubusercontent.com/aureliojargas/clitest/master/clitest

txt2tags.py:
	curl -s -L -o $@ \
	https://raw.githubusercontent.com/aureliojargas/txt2tags/3.4/txt2tags.py

#-----------------------------------------------------------------------
# Translation files
#
# Learn more: http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html
# Example potfile: http://git.savannah.gnu.org/cgit/gawk.git/tree/po/gawk.pot

pot:
	@date=`date '+%Y-%m-%d %H:%M %Z'`; \
	( \
		printf '%s\n' '#, fuzzy'; \
		printf '%s\n' 'msgid ""'; \
		printf '%s\n' 'msgstr ""'; \
		printf '"%s"\n' 'Project-Id-Version: $(NAME) $(VERSION)\n'; \
		printf '"%s"\n' "POT-Creation-Date: $$date\n"; \
		printf '"%s"\n' 'PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n'; \
		printf '"%s"\n' 'Last-Translator: FULL NAME <EMAIL@ADDRESS>\n'; \
		printf '"%s"\n' 'MIME-Version: 1.0\n'; \
		printf '"%s"\n' 'Content-Type: text/plain; charset=UTF-8\n'; \
		printf '"%s"\n' 'Content-Transfer-Encoding: 8bit\n'; \
		bash --dump-po-strings $(SCRIPT); \
	) | msguniq --no-wrap --sort-by-file -o $(POTFILE); \
	printf '%s was generated\n' $(POTFILE)

po: pot
	@for pofile in $(PODIR)/*.po; do \
		printf 'Merging %s...' $$pofile; \
		msgmerge --update --sort-by-file --no-wrap --previous \
			$$pofile $(POTFILE); \
	done; \
	printf 'Remember to grep for the fuzzy messages in all .po files\n'

mo:
	@for pofile in $(PODIR)/*.po; do \
		printf 'Compiling %s... ' $$pofile; \
		msgfmt -o $${pofile%.po}.mo $$pofile && \
		echo ok; \
	done

check-po:
	@for pofile in $(PODIR)/*.po; do \
		printf 'Checking %s...' $$pofile; \
		msgfmt --verbose $$pofile || exit 1; \
	done

#-----------------------------------------------------------------------
# Release

install: install-mo install-bin

install-mo: mo
	test -d $(LOCALEDIR) || mkdir -p $(LOCALEDIR); \
	for mofile in $(PODIR)/*.mo; do \
		moinstalldir=$(LOCALEDIR)/`basename $$mofile .mo`/LC_MESSAGES; \
		test -d $$moinstalldir || mkdir -p $$moinstalldir; \
		install -m644 $$mofile $$moinstalldir/$(NAME).mo; \
	done

install-bin:
	test -d $(BINDIR) || mkdir -p $(BINDIR); \
	sed -e '/^TEXTDOMAINDIR=/s,=.*,=$(LOCALEDIR),' \
		$(SCRIPT) > $(BINDIR)/$(NAME) && \
	chmod +x $(BINDIR)/$(NAME) && \
	printf '\nProgram "%s" installed. Just run %s\n' \
		$(NAME) $(BINDIR)/$(NAME)


================================================
FILE: README.md
================================================
## txt2regex — Regular expression wizard for the command line

![](https://aurelio.net/projects/txt2regex/img/demo.gif)

- Author: [Aurelio Jargas](https://aurelio.net/about.html)
- License: GPLv2
- First release: 2001-02-23 ([all releases](https://github.com/aureliojargas/txt2regex/releases))
- Requires: Bash >= 3.0
- Website: https://aurelio.net/projects/txt2regex/

Txt2regex is a regular expression wizard for the command line.

Users with little or no knowledge of regular expressions can quickly
create hairy regexes by answering questions in a simple text-based
interactive interface.

Txt2regex is aware of the particular notation and caveats of many
different regular expression flavors, generating valid regexes for more
than 20 targets, including grep, sed, Vim, Emacs, JavaScript, Python,
PHP, PostgreSQL.

Txt2regex is a one-file shell script made 100% with Bash builtin
commands. The only requirement is Bash itself, since no grep, find, sed
or any other system command is used.


## Command line options

See [tests/cmdline.md](tests/cmdline.md) for a list of all the
available command line options and examples on using them.


## Features

See [tests/features.md](tests/features.md) for some of the special
features txt2regex has to handle user input and compose proper regexes.


## Running

Txt2regex is a stand-alone Bash script, it doesn't need to be installed.
Just run it:

    bash txt2regex.sh

Making it an executable file, you can run it directly:

    chmod +x txt2regex.sh
    ./txt2regex.sh

If you want it in [another language][pos] besides English:

    make install BINDIR=. LOCALEDIR=po
    LANG=es_ES ./txt2regex


## Supported flavors

```console
$ bash txt2regex.sh --showmeta

awk             +      ?             |      ()    awk version 20121220
chicken         +      ?     {}      |      ()    CHICKEN 4.12.0
ed             \+     \?   \{\}     \|    \(\)    GNU Ed 1.10
egrep           +      ?     {}      |      ()    grep (GNU grep) 3.1
emacs           +      ? \\{\\}    \\|  \\(\\)    GNU Emacs 25.2.2
expect          +      ?     {}      |      ()    expect version 5.45.4
find            +      ?     {}      |      ()    find (GNU findutils) 4.7.0-git
gawk            +      ?     {}      |      ()    GNU Awk 4.1.4
grep           \+     \?   \{\}     \|    \(\)    grep (GNU grep) 3.1
javascript      +      ?     {}      |      ()    node v8.10.0
lex             +      ?     {}      |      ()    flex 2.6.4
mawk            +      ?             |      ()    mawk 1.3.3 Nov 1996
mysql           +      ?     {}      |      ()    mysql  Ver 14.14 Distrib 5.7.29
perl            +      ?     {}      |      ()    perl v5.26.1
php             +      ?     {}      |      ()    PHP 7.2.24-0ubuntu0.18.04.4
postgres        +      ?     {}      |      ()    psql (PostgreSQL) 10.12
procmail        +      ?             |      ()    procmail v3.23pre 2001/09/13
python          +      ?     {}      |      ()    Python 3.6.9
sed            \+     \?   \{\}     \|    \(\)    sed (GNU sed) 4.4
tcl             +      ?     {}      |      ()    tcl 8.6
vi                         \{\}           \(\)    nvi 1.81.6-13
vim            \+     \=    \{}     \|    \(\)    VIM - Vi IMproved 8.0 (2016 Sep 12)

NOTE: . [] [^] and * are the same on all programs.

$
```


## Regex tester to gather "real life" data

Txt2regex needs to know regex-related information for each flavor it
supports. For example:

- Which metacharacters are supported?
- How to escape a metacharacter to match it literally?
- Are POSIX character classes supported?

Instead of relying in documentation to get that information, the
[tests/regex-tester.sh](tests/regex-tester.sh) script calls the real
programs with specially crafted regexes and sample texts, verifying how
those programs behave in "real life".

To have a trackable and public record, the output of this tester is also
saved to this repository, in a readable and grepable plain text file:
[tests/regex-tester.txt](tests/regex-tester.txt). Future changes in
behavior can be easily detected.


## Testing

- `make test` — to run all the tests in the current Bash version on your
  machine.

- `make test-bash` — to run all the tests in all the released Bash
  versions since 3.0 (requires Docker).

- `make test-regex` — to run the regex tester (requires Docker).

Check the [Makefile](Makefile) for the details on what gets executed.


## Translators

    ca       Catalan       Carles (ChAoS)
    de_DE    German        Jan Parthey
    es_ES    Spanish       Diego Moya
    fr_FR    French        wwp
    id_ID    Indonesian    Muhamad Faizal
    it_IT    Italian       Daniele Pizzolli
    ja       Japanese      Hajime Dei
    pl_PL    Polish        Chris Piechowicz
    pt_BR    Portuguese    Aurelio Jargas
    ro_RO    Romanian      Robert Claudiu Gheorghe
    tr       Turkish       erayalakese

To translate txt2regex to your language:

- translate the [po/txt2regex.pot][potfile] file (in the `msgstr` lines)
- save it as `po/XX.po` (where XX is the [two-letter code][iso639] for
  your language)
- submit this new `.po` file in a pull request

Check the [current translations][pos] for reference.

[potfile]: https://github.com/aureliojargas/txt2regex/blob/master/po/txt2regex.pot
[iso639]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
[pos]: https://github.com/aureliojargas/txt2regex/tree/master/po


## FAQ

### Why?

- To try to make simple regexes less painful for beginners.
- To have a reliable source for the specific regex syntax and rules from
  different flavors.
- To have coding fun :)

### What is that `<TAB>` that appears in the regex?

That `<TAB>` represents a literal tab character. When using the regex in
the desired external program, remember to change that to a literal tab.
This is required by programs that do not support using `\t` as a
shortcut for the tab character.

### Why my terminal size (lines/columns) is not detected?

Txt2regex uses the environment variables `$LINES` and `$COLUMNS` to get
the current terminal size. Make sure you have them exported, otherwise
the default 80x25 size will be assumed.

To check if the variables are exported, run:

```bash
bash -c 'echo $COLUMNS $LINES'
```

If no numbers are shown in the output, a quick fix is running:

```bash
export COLUMNS LINES
```

As a permanent fix, add the previous `export` command to a Bash
configuration file, such as `~/.bashrc`.


================================================
FILE: TODO
================================================
txt2regex TODO:

  - new programs: expr, oawk, nawk, MKS awk, ruby, bash, java, html5, lua
  - add support for \<borders\>
  - support for user defined ranges as 0-5, a-f, etc
  - allow combinations as [A-Z0-9_.#]
  - more ready-to-use regexes! (ip, email, url)
  - ~/.txt2regexrc: remember programs, last histories, name REs
  - negated POSIX|special combination (Choice hack)
  - empty | check, for things like ^| or (|)
  - how to capture blanks on Get* (via menu)?

User requests:

  - undo last step (Bence Fejervari @ .hu)
  - std{in,out} mode to use it with a frontend (Robert-Claudiu Gheorghe @ .com)
  - interface to feed the programs with the RegEx (Chris Piechowicz @ .au)
  - on the fly regex test (zentara @ .com)
  - add other versions of the same program (julioB @ .edu)
  - escape special chars when **applying** the regex (julioB @ .edu)

Extra TODO:

  - grep TODO txt2regex.sh


================================================
FILE: man/txt2regex.html
================================================
<!DOCTYPE html>
<html>
<head>
<title>TXT2REGEX</title>
<meta name="generator" content="http://txt2tags.org">
<style>
body{background-color:#fff;color:#000;}
hr{background-color:#000;border:0;color:#000;}
hr.heavy{height:5px;}
hr.light{height:1px;}
img{border:0;display:block;}
img.right{margin:0 0 0 auto;}
img.center{border:0;margin:0 auto;}
table th,table td{padding:4px;}
.center,header{text-align:center;}
table.center {margin-left:auto; margin-right:auto;}
.right{text-align:right;}
.left{text-align:left;}
.tableborder,.tableborder td,.tableborder th{border:1px solid #000;}
.underline{text-decoration:underline;}
</style>
</head>
<body>
<header>
<hgroup>
<h1>TXT2REGEX</h1>
<h3>May 21, 2020</h3>
</hgroup>
</header>
<article>

<div class="body" id="body">

<section>
<h1>NAME</h1>

<p>
<strong>txt2regex</strong> -- console regular expression wizard
</p>

</section>
<section>
<h1>SYNOPSIS</h1>

<p>
<strong>txt2regex</strong> [<strong>--nocolor</strong>|<strong>--whitebg</strong>] [<strong>--all</strong>|<strong>--prog</strong> <em>programs</em>]
</p>
<p>
<strong>txt2regex</strong> <strong>--showmeta</strong>
</p>
<p>
<strong>txt2regex</strong> <strong>--showinfo</strong> <em>program</em> [<strong>--nocolor</strong>]
</p>
<p>
<strong>txt2regex</strong> <strong>--history</strong> <em>value</em> [<strong>--all</strong>|<strong>--prog</strong> <em>programs</em>]
</p>
<p>
<strong>txt2regex</strong> <strong>--make</strong> <em>label</em> [<strong>--all</strong>|<strong>--prog</strong> <em>programs</em>]
</p>

</section>
<section>
<h1>DESCRIPTION</h1>

<p>
<strong>txt2regex</strong> is a regular expression wizard that converts human
sentences to regexes.
</p>
<p>
In a simple interactive console interface, the user answer questions and
<strong>txt2regex</strong> builds the regexes for more than 20 programs.
</p>
<p>
<em>https://aurelio.net/projects/txt2regex/</em>
</p>

</section>
<section>
<h1>OPTIONS</h1>

<dl>
<dt><strong>--all</strong></dt><dd>
Select all the available programs. Be aware that the list of available
programs is long. You will need a terminal window with more than 40
lines for the user interface to fit. Also make sure that the <strong>$LINES</strong>
shell variable is exported, so <strong>txt2regex</strong> can detect the current
number of available lines.
<p></p>
</dd>
<dt><strong>-h</strong>, <strong>--help</strong></dt><dd>
Print the help message and quit.
<p></p>
</dd>
<dt><strong>--history &lt;value&gt;</strong></dt><dd>
Print a regex from the given history data. The history value is shown in
the last screen of the wizard, when you quit.
<p></p>
</dd>
<dt><strong>--make &lt;label&gt;</strong></dt><dd>
Print a ready regex for the specified label. Inform an empty label to
see the list of available labels.
<p></p>
</dd>
<dt><strong>--nocolor</strong></dt><dd>
Do not use colors.
<p></p>
</dd>
<dt><strong>--prog &lt;program1,program2,...&gt;</strong></dt><dd>
Specify which programs to use, separated by commas. Use <strong>--showmeta</strong>
to see the complete list of available programs.
<p></p>
</dd>
<dt><strong>--showinfo &lt;program&gt;</strong></dt><dd>
Print regex-related info about the specified program. Use <strong>--nocolor</strong>
to have a text-only output (no control characters).
<p></p>
</dd>
<dt><strong>--showmeta</strong></dt><dd>
Print a metacharacters table featuring all the programs.
<p></p>
</dd>
<dt><strong>-V</strong>, <strong>--version</strong></dt><dd>
Print the program version and quit.
<p></p>
</dd>
<dt><strong>--whitebg</strong></dt><dd>
Adjust colors for white background terminals.
</dd>
</dl>

</section>
<section>
<h1>EXAMPLES</h1>

<dl>
<dt>Using it as a wizard (interactive interface):</dt><dd>
<p></p>
<pre>
txt2regex
</pre>

<p></p>
</dd>
<dt>Specify a custom selection of programs for the wizard:</dt><dd>
<p></p>
<pre>
txt2regex --prog perl,python,php,javascript
</pre>

<p></p>
</dd>
<dt>Getting an extensive metacharacters table:</dt><dd>
<p></p>
<pre>
txt2regex --showmeta
</pre>

<p></p>
</dd>
<dt>Getting regex-related information about sed:</dt><dd>
<p></p>
<pre>
txt2regex --showinfo sed
</pre>

<p></p>
</dd>
<dt>Replay a regex by using history data:</dt><dd>
<p></p>
<pre>
txt2regex --history '16421¤:01¤:'
</pre>

<p></p>
</dd>
<dt>Getting handy ready-to-use regexes for common patterns:</dt><dd>
<p></p>
<pre>
txt2regex --make hour
txt2regex --make number3 --prog perl
txt2regex --make date2 --all
</pre>

</dd>
</dl>

</section>
<section>
<h1>WIZARD INTERFACE</h1>

<pre>
+---------------------------------------+
| Top menu                              |
| Group menu                            |
|                                       |
| Regexes of the selected programs      |
| ...                                   |
| ...                                   |
|                                       |
| History                               |
| Prompt                                |
|                                       |
| The question                          |
| The answers                           |
| ...                                   |
| ...                                   |
+---------------------------------------+
</pre>

</section>
<section>
<h1>WIZARD COMMANDS</h1>

<table>
<tr>
<td class="center"><strong>.</strong></td>
<td>Quit the program (with confirmation)</td>
</tr>
<tr>
<td class="center"><strong>0</strong></td>
<td>Reset the regular expression</td>
</tr>
<tr>
<td class="center"><strong>1-9</strong></td>
<td>Answers the questions</td>
</tr>
<tr>
<td class="center"><strong>*</strong></td>
<td>Toggles color ON/OFF</td>
</tr>
<tr>
<td class="center"><strong>/</strong></td>
<td>Add/remove programs</td>
</tr>
<tr>
<td class="center"><strong>|</strong></td>
<td>Insert an alternation (where allowed)</td>
</tr>
<tr>
<td class="center"><strong>(</strong></td>
<td>Open a new group (where allowed)</td>
</tr>
<tr>
<td class="center"><strong>)</strong></td>
<td>Close the opened group (if any)</td>
</tr>
</table>

</section>
<section>
<h1>BUGS</h1>

<p>
<a href="https://github.com/aureliojargas/txt2regex/issues">https://github.com/aureliojargas/txt2regex/issues</a>
</p>

</section>
<section>
<h1>AUTHOR</h1>

<p>
Aurelio Jargas &lt;&lt;verde (a) aurelio net&gt;&gt;
</p>

</section>
<section>
<h1>COPYRIGHT</h1>

<p>
Copyright © 2001-2020 Aurelio Jargas, GNU GPL v2
</p>
</section>
</div>

<!-- html code generated by txt2tags 3.4 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -t html man/txt2regex.t2t -->
</article></body></html>


================================================
FILE: man/txt2regex.man
================================================
.TH "TXT2REGEX" 1 "May 21, 2020" ""

.SH NAME
.P
\fBtxt2regex\fR \-\- console regular expression wizard
.SH SYNOPSIS
.P
\fBtxt2regex\fR [\fB\-\-nocolor\fR|\fB\-\-whitebg\fR] [\fB\-\-all\fR|\fB\-\-prog\fR \fIprograms\fR]
.P
\fBtxt2regex\fR \fB\-\-showmeta\fR
.P
\fBtxt2regex\fR \fB\-\-showinfo\fR \fIprogram\fR [\fB\-\-nocolor\fR]
.P
\fBtxt2regex\fR \fB\-\-history\fR \fIvalue\fR [\fB\-\-all\fR|\fB\-\-prog\fR \fIprograms\fR]
.P
\fBtxt2regex\fR \fB\-\-make\fR \fIlabel\fR [\fB\-\-all\fR|\fB\-\-prog\fR \fIprograms\fR]
.SH DESCRIPTION
.P
\fBtxt2regex\fR is a regular expression wizard that converts human
sentences to regexes.
.P
In a simple interactive console interface, the user answer questions and
\fBtxt2regex\fR builds the regexes for more than 20 programs.
.P
\fIhttps://aurelio.net/projects/txt2regex/\fR
.SH OPTIONS

.TP
\fB\-\-all\fR
Select all the available programs. Be aware that the list of available
programs is long. You will need a terminal window with more than 40
lines for the user interface to fit. Also make sure that the \fB$LINES\fR
shell variable is exported, so \fBtxt2regex\fR can detect the current
number of available lines.

.TP
\fB\-h\fR, \fB\-\-help\fR
Print the help message and quit.

.TP
\fB\-\-history <value>\fR
Print a regex from the given history data. The history value is shown in
the last screen of the wizard, when you quit.

.TP
\fB\-\-make <label>\fR
Print a ready regex for the specified label. Inform an empty label to
see the list of available labels.

.TP
\fB\-\-nocolor\fR
Do not use colors.

.TP
\fB\-\-prog <program1,program2,...>\fR
Specify which programs to use, separated by commas. Use \fB\-\-showmeta\fR
to see the complete list of available programs.

.TP
\fB\-\-showinfo <program>\fR
Print regex\-related info about the specified program. Use \fB\-\-nocolor\fR
to have a text\-only output (no control characters).

.TP
\fB\-\-showmeta\fR
Print a metacharacters table featuring all the programs.

.TP
\fB\-V\fR, \fB\-\-version\fR
Print the program version and quit.

.TP
\fB\-\-whitebg\fR
Adjust colors for white background terminals.

.SH EXAMPLES

.TP
Using it as a wizard (interactive interface):


.nf
txt2regex
.fi



.TP
Specify a custom selection of programs for the wizard:


.nf
txt2regex --prog perl,python,php,javascript
.fi



.TP
Getting an extensive metacharacters table:


.nf
txt2regex --showmeta
.fi



.TP
Getting regex\-related information about sed:


.nf
txt2regex --showinfo sed
.fi



.TP
Replay a regex by using history data:


.nf
txt2regex --history '16421¤:01¤:'
.fi



.TP
Getting handy ready\-to\-use regexes for common patterns:


.nf
txt2regex --make hour
txt2regex --make number3 --prog perl
txt2regex --make date2 --all
.fi



.SH WIZARD INTERFACE

.nf
+---------------------------------------+
| Top menu                              |
| Group menu                            |
|                                       |
| Regexes of the selected programs      |
| ...                                   |
| ...                                   |
|                                       |
| History                               |
| Prompt                                |
|                                       |
| The question                          |
| The answers                           |
| ...                                   |
| ...                                   |
+---------------------------------------+
.fi


.SH WIZARD COMMANDS

.TS
tab(^); cl.
 \fB.\fR^Quit the program (with confirmation)
 \fB0\fR^Reset the regular expression
 \fB1\-9\fR^Answers the questions
 \fB*\fR^Toggles color ON/OFF
 \fB/\fR^Add/remove programs
 \fB|\fR^Insert an alternation (where allowed)
 \fB(\fR^Open a new group (where allowed)
 \fB)\fR^Close the opened group (if any)
.TE

.SH BUGS
.P
https://github.com/aureliojargas/txt2regex/issues
.SH AUTHOR
.P
Aurelio Jargas <verde@aurelio.net>
.SH COPYRIGHT
.P
Copyright © 2001\-2020 Aurelio Jargas, GNU GPL v2

.\" man code generated by txt2tags 3.4 (http://txt2tags.org)
.\" cmdline: txt2tags -t man man/txt2regex.t2t


================================================
FILE: man/txt2regex.t2t
================================================
TXT2REGEX

May 21, 2020

%!target: man
%!options(man) : -o txt2regex.man
%!options(html): -o txt2regex.html --mask-email

= NAME =

**txt2regex** -- console regular expression wizard

= SYNOPSIS =

**txt2regex** [**""--nocolor""**|**""--whitebg""**] ""[""**""--all""**|**""--prog""** //programs//]

**txt2regex** **--showmeta**

**txt2regex** **--showinfo** //program// [**""--nocolor""**]

**txt2regex** **--history** //value// ""[""**""--all""**|**""--prog""** //programs//]

**txt2regex** **--make** //label// ""[""**""--all""**|**""--prog""** //programs//]

= DESCRIPTION =

**txt2regex** is a regular expression wizard that converts human
sentences to regexes.

In a simple interactive console interface, the user answer questions and
**txt2regex** builds the regexes for more than 20 programs.

//""https://aurelio.net/projects/txt2regex/""//

= OPTIONS =

: **--all**
Select all the available programs. Be aware that the list of available
programs is long. You will need a terminal window with more than 40
lines for the user interface to fit. Also make sure that the **$LINES**
shell variable is exported, so **txt2regex** can detect the current
number of available lines.

: **-h**, **--help**
Print the help message and quit.

: **--history <value>**
Print a regex from the given history data. The history value is shown in
the last screen of the wizard, when you quit.

: **--make <label>**
Print a ready regex for the specified label. Inform an empty label to
see the list of available labels.

: **--nocolor**
Do not use colors.

: **--prog <program1,program2,...>**
Specify which programs to use, separated by commas. Use **--showmeta**
to see the complete list of available programs.

: **--showinfo <program>**
Print regex-related info about the specified program. Use **--nocolor**
to have a text-only output (no control characters).

: **--showmeta**
Print a metacharacters table featuring all the programs.

: **-V**, **--version**
Print the program version and quit.

: **--whitebg**
Adjust colors for white background terminals.


= EXAMPLES =

: Using it as a wizard (interactive interface):

``` txt2regex

: Specify a custom selection of programs for the wizard:

``` txt2regex --prog perl,python,php,javascript

: Getting an extensive metacharacters table:

``` txt2regex --showmeta

: Getting regex-related information about sed:

``` txt2regex --showinfo sed

: Replay a regex by using history data:

``` txt2regex --history '16421¤:01¤:'

: Getting handy ready-to-use regexes for common patterns:

```
txt2regex --make hour
txt2regex --make number3 --prog perl
txt2regex --make date2 --all
```


= WIZARD INTERFACE =

```
+---------------------------------------+
| Top menu                              |
| Group menu                            |
|                                       |
| Regexes of the selected programs      |
| ...                                   |
| ...                                   |
|                                       |
| History                               |
| Prompt                                |
|                                       |
| The question                          |
| The answers                           |
| ...                                   |
| ...                                   |
+---------------------------------------+
```

= WIZARD COMMANDS =

|   **.**    | Quit the program (with confirmation)
|   **0**    | Reset the regular expression
|  **1-9**   | Answers the questions
|   *****    | Toggles color ON/OFF
|   **/**    | Add/remove programs
|   **|**    | Insert an alternation (where allowed)
|   **(**    | Open a new group (where allowed)
|   **)**    | Close the opened group (if any)

= BUGS =

https://github.com/aureliojargas/txt2regex/issues

= AUTHOR =

Aurelio Jargas <verde@aurelio.net>

= COPYRIGHT =

Copyright © 2001-2020 Aurelio Jargas, GNU GPL v2


================================================
FILE: po/ca.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.9\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2004-11-16 10:52+0100\n"
"Last-Translator: ChAOS ChAoS@gmail.com\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.9.1\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr "PROGRAMES"

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "ús:"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr "PROGRAMA"

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr "VALOR"

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr "ETIQUETA"

#: txt2regex.sh:122
msgid "Options:"
msgstr "Opcions:"

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr "Funciona amb tots els programes registrats"

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr "No fa servir colors"

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr "Colors ajustats per a terminals amb fons blanc"

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr "Tria quins programes vols fer servir, separats per comes"

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr "Imprimeix una taula de metacaràcters amb tots els programes"

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr "Imprimeix la informació regex sobre el programa especificat"

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr "Imprimeix el regex de l'arxiu d'historial donat"

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr "Imprimeix el regex per defecte per l'etiqueta especificada"

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr "Imprimeix la versió del programa i surt"

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr "Imprimeix el missatge d'ajuda i surt"

#: txt2regex.sh:277
msgid "unknown program"
msgstr "programa desconegut"

#: txt2regex.sh:305
msgid "invalid argument"
msgstr "argument invàlid"

#: txt2regex.sh:306
msgid "valid names:"
msgstr "noms vàlids:"

#: txt2regex.sh:348
msgid "invalid option"
msgstr "opció no vàlida"

#: txt2regex.sh:360
msgid "start to match"
msgstr "començar a casar"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "a principi de línia"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "a qualsevol part de la línia"

#: txt2regex.sh:371
msgid "followed by"
msgstr "seguit de"

#: txt2regex.sh:372
msgid "any character"
msgstr "qualsevol caràcter"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "un caracter específic"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "una cadena literal"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "una llista de caràcters permesos"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "una llista de caràcters prohibits"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "una combinació especial"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "una combinació POSIX (subjecte a localització)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "una regex preparada (sense implementar)"

#: txt2regex.sh:380
msgid "anything"
msgstr "qualsevol cosa"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "quantes vegades (repetició)"

#: txt2regex.sh:397
msgid "one"
msgstr "una"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "una o cap (opcional)"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "cap o més"

#: txt2regex.sh:400
msgid "one or more"
msgstr "una o més"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "exactament N"

#: txt2regex.sh:402
msgid "up to N"
msgstr "fins a N"

#: txt2regex.sh:403
msgid "at least N"
msgstr "almenys N"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "lletres majúscules"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "lletres minúscules"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "nombres"

#: txt2regex.sh:411
msgid "underscore"
msgstr "barra baixa"

#: txt2regex.sh:412
msgid "space"
msgstr "espai"

#: txt2regex.sh:413
msgid "TAB"
msgstr "Tabulador (TAB)"

#: txt2regex.sh:426
msgid "letters"
msgstr "lletres"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "lletres i nombres"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "nombres hexadecimals"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "espais en blanc (espais i tabuladors)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "caràcters gràfics (no espais en blanc)"

#: txt2regex.sh:448
msgid "quit"
msgstr "sortir"

#: txt2regex.sh:449
msgid "reset"
msgstr "reiniciar"

#: txt2regex.sh:450
msgid "color"
msgstr "color"

#: txt2regex.sh:451
msgid "programs"
msgstr "programes"

#: txt2regex.sh:474
msgid "or"
msgstr "o"

#: txt2regex.sh:475
msgid "open group"
msgstr "obrir grup"

#: txt2regex.sh:476
msgid "close group"
msgstr "tancar grup"

#: txt2regex.sh:483
msgid "not supported"
msgstr "sense suport"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr "NOTA: . [] [^] i * són el mateix en tots els programes."

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "NO"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "SÍ"

#: txt2regex.sh:765
msgid "program"
msgstr "programa"

#: txt2regex.sh:766
msgid "metas"
msgstr "metes"

#: txt2regex.sh:767
msgid "esc meta"
msgstr "esc meta"

#: txt2regex.sh:768
msgid "need esc"
msgstr "esc necessari"

#: txt2regex.sh:769
msgid "\\t in []"
msgstr "\\t a []"

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "quin?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "quin?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "sortir"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "pressioni les lletres per (des)seleccionar "

#: txt2regex.sh:1505
msgid "repeated"
msgstr "repetit"

#: txt2regex.sh:1507
msgid "times"
msgstr "vegades"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "Realment vols sortir?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr "sense regex"


================================================
FILE: po/de_DE.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.5\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2001-08-29 09:55+0100\n"
"Last-Translator: Jan Parthey <parthey@web.de>\n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr "PROGRAMME"

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "benutze:"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr "PROGRAMM"

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr "WERT"

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr ""

#: txt2regex.sh:122
msgid "Options:"
msgstr "Optionen:"

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr "Arbeitet mit allen registrierten Programmen"

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr ""

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr "Farben für Terminals mit weißen Hintergrund"

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr ""

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr "Druckt eine komplette Metachar Tabelle für alle Programme"

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr "Druckt regex Infos über das angegebene Programm"

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr "Druckt eine RegEx aus den history Daten"

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr ""

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr ""

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr ""

#: txt2regex.sh:277
msgid "unknown program"
msgstr "unbekanntes Programm"

#: txt2regex.sh:305
msgid "invalid argument"
msgstr ""

#: txt2regex.sh:306
msgid "valid names:"
msgstr ""

#: txt2regex.sh:348
msgid "invalid option"
msgstr ""

#: txt2regex.sh:360
msgid "start to match"
msgstr "Beginn der Übereinstimmung"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "am Zeilenanfang"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "irgendwo in der Zeile"

#: txt2regex.sh:371
msgid "followed by"
msgstr "gefolgt von"

#: txt2regex.sh:372
msgid "any character"
msgstr "einem beliebigen Zeichen"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "einem bestimmten Zeichen"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "einer Buchstabenfolge"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "einer Liste erlaubter Zeichen"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "einer Liste verbotener Zeichen"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "einer speziellen Kombination"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "einer POSIX Kombination (lokale Einstellungen beachten)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "einer fertigen regex (noch nicht implementiert)"

#: txt2regex.sh:380
msgid "anything"
msgstr "etwas Beliebigen"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "wie oft (Wiederholung)"

#: txt2regex.sh:397
msgid "one"
msgstr "einmal"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "null oder einmal (wahlweise)"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "null oder mehrmals"

#: txt2regex.sh:400
msgid "one or more"
msgstr "einmmal oder mehrmals"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "exakt N mal"

#: txt2regex.sh:402
msgid "up to N"
msgstr "bis zu N mal"

#: txt2regex.sh:403
msgid "at least N"
msgstr "weniger als N mal"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "Großbuchstaben"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "Kleinbuchstaben"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "Zahlen"

#: txt2regex.sh:411
msgid "underscore"
msgstr "Unterstrich"

#: txt2regex.sh:412
msgid "space"
msgstr "Leerzeichen"

#: txt2regex.sh:413
msgid "TAB"
msgstr "TAB"

#: txt2regex.sh:426
msgid "letters"
msgstr "Buchstaben"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "Buchstaben und Zahlen"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "Hexadezimalzahlen"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "Zwischenraum (Leerzeichen und TAB)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "grafische Zeichen (keine Leerzeichen)"

#: txt2regex.sh:448
msgid "quit"
msgstr "verlassen"

#: txt2regex.sh:449
msgid "reset"
msgstr "zurückstellen"

#: txt2regex.sh:450
msgid "color"
msgstr "Farbe"

#: txt2regex.sh:451
msgid "programs"
msgstr "Programme"

#: txt2regex.sh:474
msgid "or"
msgstr "oder"

#: txt2regex.sh:475
msgid "open group"
msgstr "öffne Gruppe"

#: txt2regex.sh:476
msgid "close group"
msgstr "schließe Gruppe"

#: txt2regex.sh:483
msgid "not supported"
msgstr "nicht unterstützt"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr "Anmerkung: . [] [^] und * bedeuten das selbe bei allen Programmen"

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "NEIN"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "JA"

#: txt2regex.sh:765
msgid "program"
msgstr "Programm"

#: txt2regex.sh:766
msgid "metas"
msgstr "metas"

#: txt2regex.sh:767
msgid "esc meta"
msgstr "esc meta"

#: txt2regex.sh:768
msgid "need esc"
msgstr "need esc"

#: txt2regex.sh:769
msgid "\\t in []"
msgstr "\\t in []"

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "welches?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "welche?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "beenden"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "drücken Sie den Buchstaben um das Feld (an/ab)zuwählen"

#: txt2regex.sh:1505
msgid "repeated"
msgstr "wiederholt"

#: txt2regex.sh:1507
msgid "times"
msgstr " "

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "Wirklich beenden?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr "keine regex"


================================================
FILE: po/es_ES.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.7\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2002-03-12 20:03-0000\n"
"Last-Translator: Diego Moya Velázquez <diego.moya@madrid.com>\n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8BIT\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr "PROGRAMAS"

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "uso:"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr "PROGRAMA"

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr "VALOR"

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr "NOMBRE"

#: txt2regex.sh:122
msgid "Options:"
msgstr "Opciones:"

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr "Selecciona todos los programas disponibles"

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr "No usar colores"

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr "Colores ajustados para terminales de fondo blanco"

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr "Escoge qué programas usar, separados por comas"

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr "Muestra una tabla con los metacaracteres para todos los programas"

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr "Muestra información sobre las RegEx del programa"

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr ""

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr ""

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr "Muestra la versión del programa y termina"

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr "Muestra el mensaje de ayuda y termina"

#: txt2regex.sh:277
msgid "unknown program"
msgstr "programa desconocido"

#: txt2regex.sh:305
msgid "invalid argument"
msgstr "argumento no válido"

#: txt2regex.sh:306
msgid "valid names:"
msgstr "nombres válidos:"

#: txt2regex.sh:348
msgid "invalid option"
msgstr "opción no válida"

#: txt2regex.sh:360
msgid "start to match"
msgstr "hacer coincidir"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "al comienzo de la línea"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "en cualquier parte de la línea"

#: txt2regex.sh:371
msgid "followed by"
msgstr "seguido de"

#: txt2regex.sh:372
msgid "any character"
msgstr "un carácter cualquiera"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "un carácter específico"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "una cadena literal de caracteres"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "una lista de caracteres permitidos"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "una lista de caracteres prohibidos"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "una combinación especial"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "una combinación POSIX (incluyendo caracteres locales)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "una regex lista para usar (no implementado)"

#: txt2regex.sh:380
msgid "anything"
msgstr "cualquier cosa"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "cuántas veces (repetición)"

#: txt2regex.sh:397
msgid "one"
msgstr "una"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "cero o una (opcional)"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "cero o más"

#: txt2regex.sh:400
msgid "one or more"
msgstr "una o más"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "exactamente N"

#: txt2regex.sh:402
msgid "up to N"
msgstr "como mucho N"

#: txt2regex.sh:403
msgid "at least N"
msgstr "como mínimo N"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "letras mayúsculas"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "letras minúsculas"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "cifras"

#: txt2regex.sh:411
msgid "underscore"
msgstr "carácter de subrayado"

#: txt2regex.sh:412
msgid "space"
msgstr "espacio"

#: txt2regex.sh:413
msgid "TAB"
msgstr "TAB"

#: txt2regex.sh:426
msgid "letters"
msgstr "letras"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "cifras y letras"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "cifras hexadecimales"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "blancos (espacio y TAB)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "caracteres gráficos (no blancos)"

#: txt2regex.sh:448
msgid "quit"
msgstr "salir"

#: txt2regex.sh:449
msgid "reset"
msgstr "reiniciar"

#: txt2regex.sh:450
msgid "color"
msgstr "color"

#: txt2regex.sh:451
msgid "programs"
msgstr "programas"

#: txt2regex.sh:474
msgid "or"
msgstr "o"

#: txt2regex.sh:475
msgid "open group"
msgstr "abrir grupo"

#: txt2regex.sh:476
msgid "close group"
msgstr "cerrar grupo"

#: txt2regex.sh:483
msgid "not supported"
msgstr "no soportado"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr "NOTA: . [] [^] y * son iguales para todos los programas."

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "NO"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "SI"

#: txt2regex.sh:765
msgid "program"
msgstr "programa"

#: txt2regex.sh:766
msgid "metas"
msgstr "metacaracteres"

#: txt2regex.sh:767
msgid "esc meta"
msgstr "metacarácter de escape"

#: txt2regex.sh:768
msgid "need esc"
msgstr "necesitan escape"

#: txt2regex.sh:769
msgid "\\t in []"
msgstr "\\t en []"

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "¿cuál?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "¿cuáles?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "salir"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "pulse las letras para (des)ativar los items"

#: txt2regex.sh:1505
msgid "repeated"
msgstr "repetido"

#: txt2regex.sh:1507
msgid "times"
msgstr "veces"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "¿Salir?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr "ninguna regex"


================================================
FILE: po/fr_FR.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.9\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2004-09-29 20:57+0200\n"
"Last-Translator: wwp <subscript@free.fr>\n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.3.1\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr "PROGRAMMES"

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "usage :"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr "PROGRAMME"

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr "VALEUR"

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr "NOM"

#: txt2regex.sh:122
msgid "Options:"
msgstr "Options :"

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr "Utiliser tous les programmes supportés"

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr "Ne pas utiliser de couleur"

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr "Ajuster les couleurs pour les terminaux à fond clair"

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr "Programmes à utiliser (liste de programmes séparés par une virgule)"

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr "Afficher la table des métacaractères pour chaque programme"

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr "Afficher des informations relatives à ce programme"

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr "Afficher une regex déjà utilisée auparavant"

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr "Afficher la regex correspondant à cette présélection"

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr "Afficher le nom et la version du logiciel puis quitter"

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr "Afficher l'aide puis quitter"

#: txt2regex.sh:277
msgid "unknown program"
msgstr "programme inconnu"

#: txt2regex.sh:305
msgid "invalid argument"
msgstr "argument invalide"

#: txt2regex.sh:306
msgid "valid names:"
msgstr "noms possibles :"

#: txt2regex.sh:348
msgid "invalid option"
msgstr "option invalide"

#: txt2regex.sh:360
msgid "start to match"
msgstr "début de séquence à trouver"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "en début de ligne"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "n'importe où dans la ligne"

#: txt2regex.sh:371
msgid "followed by"
msgstr "suivi par"

#: txt2regex.sh:372
msgid "any character"
msgstr "n'importe quel caractère"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "un caractère en particulier"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "une chaîne de caractères"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "une liste de caractères autorisés"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "une liste de caractères interdits"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "une combinaison spéciale"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "une combinaison POSIX (sujette à localisation)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "une regex prédéfinie (non implémenté)"

#: txt2regex.sh:380
msgid "anything"
msgstr "n'importe quoi"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "nombre de fois (répétition)"

#: txt2regex.sh:397
msgid "one"
msgstr "une exactement"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "zéro ou une (optionnel)"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "zéro ou plus"

#: txt2regex.sh:400
msgid "one or more"
msgstr "une ou plus"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "exactement N"

#: txt2regex.sh:402
msgid "up to N"
msgstr "jusqu'à N occurrences"

#: txt2regex.sh:403
msgid "at least N"
msgstr "au moins N occurrences"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "lettres majuscules"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "lettres minuscules"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "nombres"

#: txt2regex.sh:411
msgid "underscore"
msgstr "underscore"

#: txt2regex.sh:412
msgid "space"
msgstr "espace"

#: txt2regex.sh:413
msgid "TAB"
msgstr "TAB"

#: txt2regex.sh:426
msgid "letters"
msgstr "lettres"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "lettres et nombres"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "nombres hexadécimaux"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "blancs (espace et TAB)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "caractères graphiques (autres que blancs)"

#: txt2regex.sh:448
msgid "quit"
msgstr "quitter"

#: txt2regex.sh:449
msgid "reset"
msgstr "remise à zéro"

#: txt2regex.sh:450
msgid "color"
msgstr "couleur"

#: txt2regex.sh:451
msgid "programs"
msgstr "programmes"

#: txt2regex.sh:474
msgid "or"
msgstr "ou"

#: txt2regex.sh:475
msgid "open group"
msgstr "ouvrir groupe"

#: txt2regex.sh:476
msgid "close group"
msgstr "fermer groupe"

#: txt2regex.sh:483
msgid "not supported"
msgstr "non supporté"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr "NOTE : [] [^] et * sont identiques pour tous les programmes"

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "NON"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "OUI"

#: txt2regex.sh:765
msgid "program"
msgstr "programme"

#: txt2regex.sh:766
msgid "metas"
msgstr "métas"

#: txt2regex.sh:767
msgid "esc meta"
msgstr "esc méta"

#: txt2regex.sh:768
msgid "need esc"
msgstr "esc nécessaire"

#: txt2regex.sh:769
msgid "\\t in []"
msgstr "\\t dans []"

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "lequel ?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "lequel en particulier ?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "quitter"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "tapez les lettres pour (dé-)sélectionner les éléments"

#: txt2regex.sh:1505
msgid "repeated"
msgstr "répété"

#: txt2regex.sh:1507
msgid "times"
msgstr "fois"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "Quitter - êtes-vous sûr ?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr "pas de regex"


================================================
FILE: po/id_ID.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.3\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2001-06-18 11:45+0700\n"
"Last-Translator: Muhamad Faizal <faizal@mfaizal.net>\n"
"Language: id_ID\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "cara pemakaian:"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr ""

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr ""

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr ""

#: txt2regex.sh:122
msgid "Options:"
msgstr ""

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr ""

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr ""

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr ""

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr ""

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr ""

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr ""

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr ""

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr ""

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr ""

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr ""

#: txt2regex.sh:277
msgid "unknown program"
msgstr "aplikasi tidak dikenal"

#: txt2regex.sh:305
msgid "invalid argument"
msgstr ""

#: txt2regex.sh:306
msgid "valid names:"
msgstr ""

#: txt2regex.sh:348
msgid "invalid option"
msgstr ""

#: txt2regex.sh:360
msgid "start to match"
msgstr "yang ingin ditemukan"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "di awal baris"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "di sembarang tempat"

#: txt2regex.sh:371
msgid "followed by"
msgstr "diikuti oleh"

#: txt2regex.sh:372
msgid "any character"
msgstr "sembarang karakter"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "karakter tertentu"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "kalimat"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "daftar karakter yang dicari"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "daftar karakter yang tidak dicari"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "kombinasi khusus"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "kombinasi POSIX (dapat memanfaatkan aplikasi locale)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "regex yang sudah ada (belum diimplementasikan)"

#: txt2regex.sh:380
msgid "anything"
msgstr "apapun"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "banyaknya pengulangan"

#: txt2regex.sh:397
msgid "one"
msgstr "satu"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "nol atau satu"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "lebih dari atau sama dengan nol"

#: txt2regex.sh:400
msgid "one or more"
msgstr "lebih dari atau sama dengan satu"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "sejumlah N"

#: txt2regex.sh:402
msgid "up to N"
msgstr "sampai dengan N"

#: txt2regex.sh:403
msgid "at least N"
msgstr "paling sedikit N"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "huruf kapital"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "huruf biasa"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "bilangan"

#: txt2regex.sh:411
msgid "underscore"
msgstr "garis bawah"

#: txt2regex.sh:412
msgid "space"
msgstr "spasi"

#: txt2regex.sh:413
msgid "TAB"
msgstr "TAB"

#: txt2regex.sh:426
msgid "letters"
msgstr "huruf"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "huruf dan bilangan"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "bilangan heksadesimal"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "spasi kosong (spasi dan TAB)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "karakter grafis (bukan spasi kosong)"

#: txt2regex.sh:448
msgid "quit"
msgstr "keluar"

#: txt2regex.sh:449
msgid "reset"
msgstr "reset"

#: txt2regex.sh:450
msgid "color"
msgstr "warna"

#: txt2regex.sh:451
msgid "programs"
msgstr "aplikasi"

#: txt2regex.sh:474
msgid "or"
msgstr "atau"

#: txt2regex.sh:475
msgid "open group"
msgstr "buka grup"

#: txt2regex.sh:476
msgid "close group"
msgstr "tutup grup"

#: txt2regex.sh:483
msgid "not supported"
msgstr "tidak didukung"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr "CATATAN: . [] [^] dan * sama untuk semua aplikasi."

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "TIDAK"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "YA"

#: txt2regex.sh:765
msgid "program"
msgstr "aplikasi"

#: txt2regex.sh:766
msgid "metas"
msgstr "karakter meta"

#: txt2regex.sh:767
msgid "esc meta"
msgstr "karakter meta esc"

#: txt2regex.sh:768
msgid "need esc"
msgstr "perlu karakter esc"

#: txt2regex.sh:769
msgid "\\t in []"
msgstr "\\t di []"

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "yang mana?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "yang mana?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "keluar"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "tekan huruf untuk memilih aplikasi"

#: txt2regex.sh:1505
msgid "repeated"
msgstr "pengulangan"

#: txt2regex.sh:1507
msgid "times"
msgstr "kali"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "Anda yakin mau keluar?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr "tidak ada regex"

#~ msgid ""
#~ "usage: txt2regex [--nocolor|--whitebg|--all]\n"
#~ "       txt2regex --showmeta|--showinfo <program>\n"
#~ "       txt2regex [--all|--prog <p1,p2>] --make <target>\n"
#~ "       txt2regex --history <value>\n"
#~ "\n"
#~ "OPTIONS (they are default OFF):\n"
#~ "\n"
#~ "  --all                 works with all registered programs\n"
#~ "  --nocolor             self-explanatory\n"
#~ "  --whitebg             colors adjusted to white background terminals\n"
#~ "  --showmeta            prints a complete metachar table for all programs\n"
#~ "  --showinfo <program>  prints regex info about the program\n"
#~ "\n"
#~ "  --history <value>     prints to STDOUT a RegEx from a history data\n"
#~ "  --make <target>       prints a ready RegEx for a common pattern\n"
#~ "  --prog <p1,p2,...>    choose which programs to use (separated by commas)\n"
#~ "\n"
#~ "  --version             prints the program version and quit\n"
#~ "  --help                prints the help message and quit\n"
#~ "\n"
#~ "for more details about the options, read the README file."
#~ msgstr ""
#~ "cara pemakaian: txt2regex [--nocolor|--whitebg|--all]\n"
#~ "                txt2regex --showmeta|--showinfo <program>\n"
#~ "                txt2regex --history <nilai>\n"
#~ "\n"
#~ "OPTIONS (secara default dimatikan / OFF):\n"
#~ "\n"
#~ "  --all                 kerjakan untuk semua program yang telah terdaftar\n"
#~ "  --nocolor             tanpa warna\n"
#~ "  --whitebg             warna disesuaikan dengan terminal berlatar belakang putih\n"
#~ "  --showmeta            prints a complete metachar table for all programs\n"
#~ "  --showinfo <program>  prints regex info about the program\n"
#~ "  --history <nilai>     cetak ke STDOUT sebuah RegEx yang sudah pernah dikerjakan\n"
#~ "\n"
#~ "  --version             prints the program version and quit\n"
#~ "  --help                prints the help message and quit\n"
#~ "\n"
#~ "untuk lebih jelas mengenai berbagai opsi di atas, bacalah file README."


================================================
FILE: po/it_IT.po
================================================
# Translator: Daniele Pizzolli
# Revision  : Marco Pagnanini
#
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.7\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2003-02-20 13:24+0100\n"
"Last-Translator: Marco Pagnanini\n"
"Language: it_IT\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr "PROGRAMMI"

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "uso:"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr "PROGRAMMA"

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr "VALORE"

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr ""

#: txt2regex.sh:122
msgid "Options:"
msgstr "Opzioni:"

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr "Funziona con tutti i programmi registrati"

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr ""

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr "Colori adatti per lo sfondo bianco"

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr "Sceglie quali programmi usare, separati da virgole"

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr "Stampa una tabella completa dei metacaratteri per ogni programma"

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr "Stampa delle informazioni sulle regex del programma"

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr "Stampa la regex presa dalla history"

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr "Stampa una regex da una espressione comune"

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr "Stampa la versione del programma ed esce"

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr "Stampa il messaggio d'aiuto ed esce"

#: txt2regex.sh:277
msgid "unknown program"
msgstr "programma sconosciuto"

#: txt2regex.sh:305
msgid "invalid argument"
msgstr "argomento non corretto"

#: txt2regex.sh:306
msgid "valid names:"
msgstr "nomi validi:"

#: txt2regex.sh:348
msgid "invalid option"
msgstr "opzione non corretta"

# ???
# ricerca della corrispondenza?
#: txt2regex.sh:360
msgid "start to match"
msgstr "inizia la ricerca"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "all'inizio della riga"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "in qualsiasi parte della riga"

# continua con è meglio di seguito da perché va bene per M e F
#: txt2regex.sh:371
msgid "followed by"
msgstr "continua con"

#: txt2regex.sh:372
msgid "any character"
msgstr "un qualsiasi carattere"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "un carattere specifico"

# this means that . becomes \. and $ becomes \$ in vim  or not?
# I don't understand or this is a bug!
# da inserire letteralmente???
#: txt2regex.sh:374
msgid "a literal string"
msgstr "una stringa da interpretare letteralmente"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "una lista di caratteri ammessi"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "una lista di caratteri non ammessi"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "una combinazione speciale"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "una combinazione POSIX (tiene conto delle impostazioni locali)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "una regex pronta (non ancora implementato)"

#: txt2regex.sh:380
msgid "anything"
msgstr "qualsiasi cosa"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "quante volte deve essere ripetuta"

#: txt2regex.sh:397
msgid "one"
msgstr "una"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "zero o una (opzionale)"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "zero o più"

#: txt2regex.sh:400
msgid "one or more"
msgstr "una o più"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "esattamente N"

#: txt2regex.sh:402
msgid "up to N"
msgstr "al minimo N"

#: txt2regex.sh:403
msgid "at least N"
msgstr "al massimo N"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "lettere maiuscole"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "lettere minuscole"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "numeri"

#: txt2regex.sh:411
msgid "underscore"
msgstr "trattino basso (underscore)"

#: txt2regex.sh:412
msgid "space"
msgstr "spazio"

#: txt2regex.sh:413
msgid "TAB"
msgstr "TAB"

#: txt2regex.sh:426
msgid "letters"
msgstr "lettere"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "lettere e numeri"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "numeri esadecimali"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "spazi bianchi (spazio e TAB)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "caratteri grafici (cioè non spazi bianchi)"

#: txt2regex.sh:448
msgid "quit"
msgstr "esci"

#: txt2regex.sh:449
msgid "reset"
msgstr "riparti"

#: txt2regex.sh:450
msgid "color"
msgstr "colore"

#: txt2regex.sh:451
msgid "programs"
msgstr "programma"

#: txt2regex.sh:474
msgid "or"
msgstr "o"

#: txt2regex.sh:475
msgid "open group"
msgstr "apri gruppo (o)"

#: txt2regex.sh:476
msgid "close group"
msgstr "chiudi gruppo"

#: txt2regex.sh:483
msgid "not supported"
msgstr "non supportato"

# are the same or have the same meaning
# o hanno lo stesso significato ???
#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr "NOTA: . [] [^] e * sono le stesse in ogni programma."

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "NO"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "Sì"

#: txt2regex.sh:765
msgid "program"
msgstr "programma"

#: txt2regex.sh:766
msgid "metas"
msgstr "meta caratteri"

#: txt2regex.sh:767
msgid "esc meta"
msgstr "carattere esc"

#: txt2regex.sh:768
msgid "need esc"
msgstr "abbisognano di esc"

#: txt2regex.sh:769
msgid "\\t in []"
msgstr "\\t in []"

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "Quale?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "Quale?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "uscita"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "premi le lettere per (de)selezionare i programmi corrispondenti"

# solo per perché altrimenti bisogna tenere conto di M, F, S e P
#: txt2regex.sh:1505
msgid "repeated"
msgstr "per"

#: txt2regex.sh:1507
msgid "times"
msgstr "volte"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "Vuoi veramente uscire?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr "nessuna regex"


================================================
FILE: po/ja.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.6\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2001-09-15 10:53+0900\n"
"Last-Translator: Koichi OIKE <daichi1@gol.com>\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr ""

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr ""

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr ""

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr ""

#: txt2regex.sh:122
msgid "Options:"
msgstr ""

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr ""

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr ""

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr ""

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr ""

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr ""

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr ""

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr ""

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr ""

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr ""

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr ""

#: txt2regex.sh:277
msgid "unknown program"
msgstr ""

#: txt2regex.sh:305
msgid "invalid argument"
msgstr ""

#: txt2regex.sh:306
msgid "valid names:"
msgstr ""

#: txt2regex.sh:348
msgid "invalid option"
msgstr ""

#: txt2regex.sh:360
msgid "start to match"
msgstr "マッチを始めるのは"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "行の先頭から"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "行の任意の部分から"

#: txt2regex.sh:371
msgid "followed by"
msgstr "それに続いて"

#: txt2regex.sh:372
msgid "any character"
msgstr "任意の文字"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "(そのままの)文字"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "(そのままの)文字列"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "文字クラス"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "否定文字クラス"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "特定の文字の組合せ"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "POSIX文字クラス(ロケール対応)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "準備済みの正規表現(未実装)"

#: txt2regex.sh:380
msgid "anything"
msgstr "(0文字以上の)任意の文字列"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "何回繰り返しますか"

#: txt2regex.sh:397
msgid "one"
msgstr "1"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "0または1"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "少なくとも0"

#: txt2regex.sh:400
msgid "one or more"
msgstr "少なくとも1"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "正確にN"

#: txt2regex.sh:402
msgid "up to N"
msgstr "1からN"

#: txt2regex.sh:403
msgid "at least N"
msgstr "少なくともN"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "大文字アルファベット"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "小文字アルファベット"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "数字"

#: txt2regex.sh:411
msgid "underscore"
msgstr "下線(_)"

#: txt2regex.sh:412
msgid "space"
msgstr "スペース"

#: txt2regex.sh:413
msgid "TAB"
msgstr "タブ"

#: txt2regex.sh:426
msgid "letters"
msgstr "アルファベット"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "アルファベットと数字"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "16進数字"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "空白文字(スペースとタブ)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "非空白文字"

#: txt2regex.sh:448
msgid "quit"
msgstr "終了"

#: txt2regex.sh:449
msgid "reset"
msgstr "リセット"

#: txt2regex.sh:450
msgid "color"
msgstr "色"

#: txt2regex.sh:451
msgid "programs"
msgstr "プログラム"

#: txt2regex.sh:474
msgid "or"
msgstr "または"

#: txt2regex.sh:475
msgid "open group"
msgstr "グループ化開始"

#: txt2regex.sh:476
msgid "close group"
msgstr "グループ化終了"

#: txt2regex.sh:483
msgid "not supported"
msgstr "未サポート部分"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr ""

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr ""

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr ""

#: txt2regex.sh:765
msgid "program"
msgstr ""

#: txt2regex.sh:766
msgid "metas"
msgstr ""

#: txt2regex.sh:767
msgid "esc meta"
msgstr ""

#: txt2regex.sh:768
msgid "need esc"
msgstr ""

#: txt2regex.sh:769
msgid "\\t in []"
msgstr ""

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "どの文字?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "どのような?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "戻る"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "文字を入力して項目を選択(解除)してください"

#: txt2regex.sh:1505
msgid "repeated"
msgstr "繰り返しは"

#: txt2regex.sh:1507
msgid "times"
msgstr "回"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr ""

#: txt2regex.sh:1540
msgid "no regex"
msgstr "正規表現はありません"


================================================
FILE: po/pl_PL.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.5\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2001-08-28 10:43-0300\n"
"Last-Translator: Chris Piechowicz <chris_piechowicz@hotmail.com>\n"
"Language: pl_PL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr "PROGRAMY"

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "użycie:"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr "PROGRAM"

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr "WARTOŚĆ"

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr "ETYKIETA"

#: txt2regex.sh:122
msgid "Options:"
msgstr "Opcje:"

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr "Działanie ze wszystkimi zarejestrowanymi programami"

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr "Nie używaj kolorów"

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr "Kolory skalibrowane dla terminali o białym tle"

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr "Wybierz których programów chcesz użyć, oddziel przecinkami"

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr "Wyświetla tabelę metacharakterów dla wszystkich programów"

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr "Wyświetla regex dla określonego programu"

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr "Wyświetla regex z danych danych z historii"

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr "Wyświetla domyślny regex dla wyszczególnionej etykiety"

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr "Wyświetla wersję programu i zamyka go"

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr "Wyświetla pomoc i zamyka program"

#: txt2regex.sh:277
msgid "unknown program"
msgstr "nieznany program"

#: txt2regex.sh:305
msgid "invalid argument"
msgstr "błędny argument"

#: txt2regex.sh:306
#, fuzzy
msgid "valid names:"
msgstr "właściwe nazwy to:"

#: txt2regex.sh:348
msgid "invalid option"
msgstr "błędna opcja"

#: txt2regex.sh:360
msgid "start to match"
msgstr "Zacznij dopasowywać"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "na początku linii"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "w jakikolwiek częci lini"

#: txt2regex.sh:371
msgid "followed by"
msgstr "przed"

#: txt2regex.sh:372
msgid "any character"
msgstr "jakikolwiek znak"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "konkretny znak"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "literał łańcuchowy ()"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "lista dozwolonych znaków"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "lista niedozwolonych znaków"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "specjalna kombinacja"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "POSIX kombinacja (świadoma lokalizacja)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "gotowy regex (nie zaimplementowana)"

#: txt2regex.sh:380
msgid "anything"
msgstr "cokolwiek"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "ile razy"

#: txt2regex.sh:397
msgid "one"
msgstr "jeden"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "zero albo jeden (nieobowiązkowe)"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "zero albo więcej"

#: txt2regex.sh:400
msgid "one or more"
msgstr "jeden albo więcej"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "dokładnie N"

#: txt2regex.sh:402
msgid "up to N"
msgstr "aż do N"

#: txt2regex.sh:403
msgid "at least N"
msgstr "przynajmniej N"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "duże litery"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "małe litery"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "cyfry"

#: txt2regex.sh:411
msgid "underscore"
msgstr "podkreślenie"

#: txt2regex.sh:412
msgid "space"
msgstr "odstęp"

#: txt2regex.sh:413
msgid "TAB"
msgstr "tabulator"

#: txt2regex.sh:426
msgid "letters"
msgstr "litery"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "litery i cyfry"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "numery hexadecimalne"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "niewidoczne odstępy (odstęp i tabulator)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "znaki graficzne (widoczne)"

#: txt2regex.sh:448
msgid "quit"
msgstr "zamknij"

#: txt2regex.sh:449
msgid "reset"
msgstr "zresetuj"

#: txt2regex.sh:450
msgid "color"
msgstr "kolor"

#: txt2regex.sh:451
msgid "programs"
msgstr "programy"

#: txt2regex.sh:474
msgid "or"
msgstr "albo"

#: txt2regex.sh:475
msgid "open group"
msgstr "otwórz grupę"

#: txt2regex.sh:476
msgid "close group"
msgstr "zamknij grupę"

#: txt2regex.sh:483
msgid "not supported"
msgstr "nieobsługiwane"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr "UWAGA: . [] [^] i * są takie same w każdym programie"

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "NIE"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "TAK"

#: txt2regex.sh:765
msgid "program"
msgstr "program"

#: txt2regex.sh:766
msgid "metas"
msgstr "znaki meta"

#: txt2regex.sh:767
msgid "esc meta"
msgstr "ESC"

#: txt2regex.sh:768
msgid "need esc"
msgstr "potrzeba ESC"

#: txt2regex.sh:769
msgid "\\t in []"
msgstr "\\t w []"

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "który?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "które?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "wyjdź"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "naciśnij klawisz żeby anulować wybór programu"

#: txt2regex.sh:1505
msgid "repeated"
msgstr "powtarzane"

#: txt2regex.sh:1507
msgid "times"
msgstr "razy"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "Na pewno chcesz wyjść ?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr "nie regex"


================================================
FILE: po/pt_BR.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.6\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2001-09-03 18:43-0300\n"
"Last-Translator: Aurelio Jargas <verde@aurelio.net>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8BIT\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr "ERRO"

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr "PROGRAMAS"

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "uso:"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr "PROGRAMA"

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr "VALOR"

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr "NOME"

#: txt2regex.sh:122
msgid "Options:"
msgstr "Opções:"

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr "Ativa todos os programas disponíveis"

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr "Não usar cores"

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr "Ajuste as cores para terminais de fundo branco"

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr "Informe quais programas usar, separados por vírgulas"

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr "Mostre uma tabela com os metacaracteres de todos os programas"

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr "Mostra informações sobre o programa informado"

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr "Mostra uma regex a partir dos dados de histórico informados"

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr "Mostra uma regex já pronta"

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr "Mostra a versão do programa e sai"

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr "Mostra a mensagem de ajuda e sai"

#: txt2regex.sh:277
msgid "unknown program"
msgstr "programa desconhecido"

#: txt2regex.sh:305
msgid "invalid argument"
msgstr "argumento inválido"

#: txt2regex.sh:306
msgid "valid names:"
msgstr "nomes válidos:"

#: txt2regex.sh:348
msgid "invalid option"
msgstr "opção inválida"

#: txt2regex.sh:360
msgid "start to match"
msgstr "comece a casar a partir"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "do começo da linha"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "de qualquer lugar da linha"

#: txt2regex.sh:371
msgid "followed by"
msgstr "seguido de"

#: txt2regex.sh:372
msgid "any character"
msgstr "um caractere qualquer"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "um caractere específico"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "uma cadeia de caracteres literais"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "uma lista de caracteres permitidos"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "uma lista de caracteres proibidos"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "uma combinação especial"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "uma combinação POSIX (inclui acentuação)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "uma regex pronta (não implementado)"

#: txt2regex.sh:380
msgid "anything"
msgstr "qualquer coisa"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "quantas vezes (repetição)"

#: txt2regex.sh:397
msgid "one"
msgstr "uma"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "zero ou uma (opcional)"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "zero ou mais"

#: txt2regex.sh:400
msgid "one or more"
msgstr "uma ou mais"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "exatamente N"

#: txt2regex.sh:402
msgid "up to N"
msgstr "até N"

#: txt2regex.sh:403
msgid "at least N"
msgstr "no mínimo N"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "letras maiúsculas"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "letras minúsculas"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "números"

#: txt2regex.sh:411
msgid "underscore"
msgstr "sublinha"

#: txt2regex.sh:412
msgid "space"
msgstr "espaço"

#: txt2regex.sh:413
msgid "TAB"
msgstr "TAB"

#: txt2regex.sh:426
msgid "letters"
msgstr "letras"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "letras e números"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "números hexadecimais"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "brancos (espaço e TAB)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "caracteres gráficos (não brancos)"

#: txt2regex.sh:448
msgid "quit"
msgstr "sair"

#: txt2regex.sh:449
msgid "reset"
msgstr "zerar"

#: txt2regex.sh:450
msgid "color"
msgstr "cor"

#: txt2regex.sh:451
msgid "programs"
msgstr "programas"

#: txt2regex.sh:474
msgid "or"
msgstr "ou"

#: txt2regex.sh:475
msgid "open group"
msgstr "abrir grupo"

#: txt2regex.sh:476
msgid "close group"
msgstr "fechar grupo"

#: txt2regex.sh:483
msgid "not supported"
msgstr "não suportado"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr "NOTA: . [] [^] e * são iguais para todos."

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "NÃO"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "SIM"

#: txt2regex.sh:765
msgid "program"
msgstr "programa"

#: txt2regex.sh:766
msgid "metas"
msgstr "metas"

#: txt2regex.sh:767
msgid "esc meta"
msgstr "meta de escape"

#: txt2regex.sh:768
msgid "need esc"
msgstr "precisa escapar"

#: txt2regex.sh:769
msgid "\\t in []"
msgstr "\\t em []"

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr "O seu terminal tem %d linhas, mas o txt2regex precisa de ao menos %d."

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr "Aumente o número de linhas ou escolha menos programas com --prog."

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr "Se esta detecção de linhas estiver incorreta, exporte a variável LINES."

#: txt2regex.sh:1027
msgid "which one?"
msgstr "qual?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "quais?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "sair"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "escolha as letras para (des)ativar os itens"

#: txt2regex.sh:1505
msgid "repeated"
msgstr "repetido"

#: txt2regex.sh:1507
msgid "times"
msgstr "vezes"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "Vai sair mesmo?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr "nenhuma regex"


================================================
FILE: po/ro_RO.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.7\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2004-05-10 00:00+000\n"
"Last-Translator: Robert Gheorghe <robert...@yahoo.ca>\n"
"Language: ro_RO\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "utilizare:"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr ""

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr ""

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr ""

#: txt2regex.sh:122
msgid "Options:"
msgstr "Optiuni:"

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr "Sa functioneze cu toate programele suportate"

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr "Arata meniul in alb/negru"

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr "Foloseste culori vizibile pe terminale cu fundal alb."

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr "Alege ce programe sa folosesti (separate de virgule)"

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr "Tipareste tabela de simboluri(metacaractere) pentru toate programele suportate"

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr "Tipareste informatii regex pertinente programului specificat"

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr ""

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr "Tipareste un regex pre-calculat(generic)"

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr "Tipareste versiunea programului si iese"

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr "Tipareste mesajul de ajutor si iese"

#: txt2regex.sh:277
msgid "unknown program"
msgstr "program necunoscut"

#: txt2regex.sh:305
msgid "invalid argument"
msgstr "argument invalid"

#: txt2regex.sh:306
msgid "valid names:"
msgstr "nume valide:"

#: txt2regex.sh:348
msgid "invalid option"
msgstr "optiune invalida"

#: txt2regex.sh:360
msgid "start to match"
msgstr "incepe cautarea"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "la inceputul liniei"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "oriunde pe linie"

#: txt2regex.sh:371
msgid "followed by"
msgstr "urmat(a) de"

#: txt2regex.sh:372
msgid "any character"
msgstr "orice caracter"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "un caracter specific"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "un sir de caractere"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "o lista de caractere permise"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "a lista de caractere interzise"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "o combinatie speciala"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "o combinatie POSIX (locale aware)"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "o expresie regulata existenta (optine ne-implementata)"

#: txt2regex.sh:380
msgid "anything"
msgstr "orice"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "de cate ori (repetitii)"

#: txt2regex.sh:397
msgid "one"
msgstr "o data"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "niciodata sau o data (camp optional)"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "zero sau mai multe"

#: txt2regex.sh:400
msgid "one or more"
msgstr "unu sau mai multe"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "de exact N ori"

#: txt2regex.sh:402
msgid "up to N"
msgstr "de pana la N ori"

#: txt2regex.sh:403
msgid "at least N"
msgstr "cel putin N ori"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "litere mari"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "litere mici"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "numere"

#: txt2regex.sh:411
msgid "underscore"
msgstr "underscore"

#: txt2regex.sh:412
msgid "space"
msgstr "spatiu"

#: txt2regex.sh:413
msgid "TAB"
msgstr "caracterul TAB"

#: txt2regex.sh:426
msgid "letters"
msgstr "litere"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "litere si numere"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "numere hexadecimale"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "spatii albe (spatii si TAB-uri)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr "caractere grafice (care nu sunt spatii albe)"

#: txt2regex.sh:448
msgid "quit"
msgstr "renunta"

#: txt2regex.sh:449
msgid "reset"
msgstr "reporneste"

#: txt2regex.sh:450
msgid "color"
msgstr "culoare"

#: txt2regex.sh:451
msgid "programs"
msgstr "programe"

#: txt2regex.sh:474
msgid "or"
msgstr "sau"

#: txt2regex.sh:475
msgid "open group"
msgstr "deschide grupare"

#: txt2regex.sh:476
msgid "close group"
msgstr "inchide grupare"

#: txt2regex.sh:483
msgid "not supported"
msgstr "nu e suportata"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr "NOTA: . [] [^] si * sunt aceleasi in toate programele."

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "NU"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "DA"

#: txt2regex.sh:765
msgid "program"
msgstr "program"

#: txt2regex.sh:766
msgid "metas"
msgstr "meta caractere"

#: txt2regex.sh:767
msgid "esc meta"
msgstr "meta-caractere escapate"

#: txt2regex.sh:768
msgid "need esc"
msgstr "necesita esc"

#: txt2regex.sh:769
msgid "\\t in []"
msgstr "\\t in []"

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "care din ele?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "care?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "iesire"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "apasa literele ca sa (de)selectezi elementele"

#: txt2regex.sh:1505
msgid "repeated"
msgstr "repetata"

#: txt2regex.sh:1507
msgid "times"
msgstr "ori"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "Esti sigur(a) ca vrei sa renunti?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr ""

#~ msgid ""
#~ "usage: txt2regex [--nocolor|--whitebg|--all]\n"
#~ "       txt2regex --showmeta|--showinfo <program>\n"
#~ "       txt2regex [--all|--prog <p1,p2>] --make <target>\n"
#~ "       txt2regex --history <value>\n"
#~ "\n"
#~ "OPTIONS (they are default OFF):\n"
#~ "\n"
#~ "  --all                 works with all registered programs\n"
#~ "  --nocolor             self-explanatory\n"
#~ "  --whitebg             colors adjusted to white background terminals\n"
#~ "  --showmeta            prints a complete metachar table for all programs\n"
#~ "  --showinfo <program>  prints regex info about the program\n"
#~ "\n"
#~ "  --history <value>     prints to STDOUT a RegEx from a history data\n"
#~ "  --make <target>       prints a ready RegEx for a common pattern\n"
#~ "  --prog <p1,p2,...>    choose which programs to use (separated by commas)\n"
#~ "\n"
#~ "  --version             prints the program version and quit\n"
#~ "  --help                prints the help message and quit\n"
#~ "\n"
#~ "for more details about the options, read the README file."
#~ msgstr ""
#~ "utilizare: txt2regex [--nocolor|--whitebg|--all]\n"
#~ "       txt2regex --showmeta|--showinfo <program>\n"
#~ "       txt2regex [--all|--prog <p1,p2>] --make <target>\n"
#~ "       txt2regex --history <value>\n"
#~ "\n"
#~ "OPTIUNI (implicit sunt dezactivate):\n"
#~ "\n"
#~ "  --all                 sa functioneze cu toate programele suportate\n"
#~ "  --nocolor             arata meniul in alb/negru\n"
#~ "  --whitebg             foloseste culori vizibile pe terminale cu fundal alb.\n"
#~ "  --showmeta            tipareste tabela de simboluri(metacaractere) pentru toate programele suportate\n"
#~ "  --showinfo <program>  tipareste informatii regex pertinente programului specificat\n"
#~ "\n"
#~ "  --history <value>     tipareste la STDOUT RegEx 'from a history data'\n"
#~ "  --make <target>       tipareste un RegEx pre-calculat(generic)\n"
#~ "  --prog <p1,p2,...>    alege ce programe sa folosesti (separate de virgule)\n"
#~ "\n"
#~ "  --version             tipareste versiunea programului si iese\n"
#~ "  --help                tipareste mesajul de ajutor si iese\n"
#~ "\n"
#~ "pentru detalii mai de amanunt despre optiunile programului, citeste fisierul README."


================================================
FILE: po/tr.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.9\n"
"POT-Creation-Date: 2020-05-17 07:16 CEST\n"
"PO-Revision-Date: 2016-06-06 23:42+0300\n"
"Last-Translator: erayalakese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Loco-Source-Locale: tr_TR\n"
"X-Loco-Parser: loco_parse_po\n"
"X-Generator: Loco - https://localise.biz/\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr "PROGRAMLAR"

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr "kullanım:"

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr "PROGRAM"

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr "DEĞER"

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr "ETİKET"

#: txt2regex.sh:122
msgid "Options:"
msgstr "Seçenekler:"

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr "Tüm kayıtlı programlarla çalışır"

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr "Renk kullanma"

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr "Renkler siyah-beyaz terminal ekranlarına göre ayarlanır"

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr "Hangi programların kullanılanacağını seçin (virgülle ayrılmış)"

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr ""

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr "Belirtilen program için regex bilgisi verir"

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr ""

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr ""

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr "Program versiyonunu yazdırır ve çıkar"

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr "Yardım mesajı yazdırır ve çıkar"

#: txt2regex.sh:277
msgid "unknown program"
msgstr ""

#: txt2regex.sh:305
msgid "invalid argument"
msgstr "geçersiz parametre"

#: txt2regex.sh:306
#, fuzzy
msgid "valid names:"
msgstr "geçerli isimler:"

#: txt2regex.sh:348
msgid "invalid option"
msgstr "geçersiz seçenek"

#: txt2regex.sh:360
msgid "start to match"
msgstr "eşleştirmeye başla"

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr "sayfanın başında"

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr "sayfanın herhangi bir yerinde"

#: txt2regex.sh:371
msgid "followed by"
msgstr ""

#: txt2regex.sh:372
msgid "any character"
msgstr "herhangi bir karakter"

#: txt2regex.sh:373
msgid "a specific character"
msgstr "belli bir karakter"

#: txt2regex.sh:374
msgid "a literal string"
msgstr "belli bir ifade (string)"

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr "izin verilen karakterler listesi"

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr "yasaklı karakterler listesi"

#: txt2regex.sh:377
msgid "a special combination"
msgstr "özel bir kombinasyon"

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr "POSIX kombinasyonu"

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr "hazır bir REGEX (henüz implement edilmedi)"

#: txt2regex.sh:380
msgid "anything"
msgstr "herşey"

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr "kaç kere (tekrar)"

#: txt2regex.sh:397
msgid "one"
msgstr "bir"

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr "sıfır ya da bir (isteğe bağlı)"

#: txt2regex.sh:399
msgid "zero or more"
msgstr "sıfır ya da daha fazla"

#: txt2regex.sh:400
msgid "one or more"
msgstr "bir ya da daha fazla"

#: txt2regex.sh:401
msgid "exactly N"
msgstr "N tane"

#: txt2regex.sh:402
msgid "up to N"
msgstr "N'e kadar"

#: txt2regex.sh:403
msgid "at least N"
msgstr "en az N tane"

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr "büyük harfler"

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr "küçük harfler"

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr "sayılar"

#: txt2regex.sh:411
msgid "underscore"
msgstr "altçizgi"

#: txt2regex.sh:412
msgid "space"
msgstr "boşluk"

#: txt2regex.sh:413
msgid "TAB"
msgstr ""

#: txt2regex.sh:426
msgid "letters"
msgstr "harfler"

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr "harfler ve sayılar"

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr "heksadesimal sayılar"

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr "boşluklar (space ve TAB)"

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr ""

#: txt2regex.sh:448
msgid "quit"
msgstr "çık"

#: txt2regex.sh:449
msgid "reset"
msgstr "sıfırla"

#: txt2regex.sh:450
msgid "color"
msgstr "renk"

#: txt2regex.sh:451
msgid "programs"
msgstr ""

#: txt2regex.sh:474
msgid "or"
msgstr "veya"

#: txt2regex.sh:475
msgid "open group"
msgstr "grup aç"

#: txt2regex.sh:476
msgid "close group"
msgstr "grubu kapat"

#: txt2regex.sh:483
msgid "not supported"
msgstr "desteklenmiyor"

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr ""

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr "HAYIR"

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr "EVET"

#: txt2regex.sh:765
msgid "program"
msgstr ""

#: txt2regex.sh:766
msgid "metas"
msgstr ""

#: txt2regex.sh:767
msgid "esc meta"
msgstr ""

#: txt2regex.sh:768
msgid "need esc"
msgstr ""

#: txt2regex.sh:769
msgid "\\t in []"
msgstr ""

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr "hangisi?"

#: txt2regex.sh:1043
msgid "which?"
msgstr "hangisi?"

#: txt2regex.sh:1326
msgid "exit"
msgstr "çık"

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr "seçimi değiştirmek için harflere basın"

#: txt2regex.sh:1505
msgid "repeated"
msgstr "tekrar edildi"

#: txt2regex.sh:1507
msgid "times"
msgstr "kere"

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr "Gerçekten çıkmak istiyor musunuz?"

#: txt2regex.sh:1540
msgid "no regex"
msgstr "regex yok"


================================================
FILE: po/txt2regex.pot
================================================
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: txt2regex 0.9\n"
"POT-Creation-Date: 2020-05-21 00:49 CEST\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: txt2regex.sh:92
msgid "ERROR"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:118 txt2regex.sh:120 txt2regex.sh:129
msgid "PROGRAMS"
msgstr ""

#: txt2regex.sh:112 txt2regex.sh:114 txt2regex.sh:116 txt2regex.sh:118
#: txt2regex.sh:120
msgid "usage:"
msgstr ""

#: txt2regex.sh:116 txt2regex.sh:134
msgid "PROGRAM"
msgstr ""

#: txt2regex.sh:118 txt2regex.sh:136
msgid "VALUE"
msgstr ""

#: txt2regex.sh:120 txt2regex.sh:138
msgid "LABEL"
msgstr ""

#: txt2regex.sh:122
msgid "Options:"
msgstr ""

#: txt2regex.sh:124
msgid "Select all the available programs"
msgstr ""

#: txt2regex.sh:126
msgid "Do not use colors"
msgstr ""

#: txt2regex.sh:128
msgid "Adjust colors for white background terminals"
msgstr ""

#: txt2regex.sh:130
msgid "Specify which programs to use, separated by commas"
msgstr ""

#: txt2regex.sh:133
msgid "Print a metacharacters table featuring all the programs"
msgstr ""

#: txt2regex.sh:135
msgid "Print regex-related info about the specified program"
msgstr ""

#: txt2regex.sh:137
msgid "Print a regex from the given history data"
msgstr ""

#: txt2regex.sh:139
msgid "Print a ready regex for the specified label"
msgstr ""

#: txt2regex.sh:142
msgid "Print the program version and quit"
msgstr ""

#: txt2regex.sh:144
msgid "Print the help message and quit"
msgstr ""

#: txt2regex.sh:277
msgid "unknown program"
msgstr ""

#: txt2regex.sh:305
msgid "invalid argument"
msgstr ""

#: txt2regex.sh:306
msgid "valid names:"
msgstr ""

#: txt2regex.sh:348
msgid "invalid option"
msgstr ""

#: txt2regex.sh:360
msgid "start to match"
msgstr ""

#: txt2regex.sh:361
msgid "on the line beginning"
msgstr ""

#: txt2regex.sh:362
msgid "in any part of the line"
msgstr ""

#: txt2regex.sh:371
msgid "followed by"
msgstr ""

#: txt2regex.sh:372
msgid "any character"
msgstr ""

#: txt2regex.sh:373
msgid "a specific character"
msgstr ""

#: txt2regex.sh:374
msgid "a literal string"
msgstr ""

#: txt2regex.sh:375
msgid "an allowed characters list"
msgstr ""

#: txt2regex.sh:376
msgid "a forbidden characters list"
msgstr ""

#: txt2regex.sh:377
msgid "a special combination"
msgstr ""

#: txt2regex.sh:378
msgid "a POSIX combination (locale aware)"
msgstr ""

#: txt2regex.sh:379
msgid "a ready regex (not implemented)"
msgstr ""

#: txt2regex.sh:380
msgid "anything"
msgstr ""

#: txt2regex.sh:396
msgid "how many times (repetition)"
msgstr ""

#: txt2regex.sh:397
msgid "one"
msgstr ""

#: txt2regex.sh:398
msgid "zero or one (optional)"
msgstr ""

#: txt2regex.sh:399
msgid "zero or more"
msgstr ""

#: txt2regex.sh:400
msgid "one or more"
msgstr ""

#: txt2regex.sh:401
msgid "exactly N"
msgstr ""

#: txt2regex.sh:402
msgid "up to N"
msgstr ""

#: txt2regex.sh:403
msgid "at least N"
msgstr ""

#: txt2regex.sh:408 txt2regex.sh:428
msgid "uppercase letters"
msgstr ""

#: txt2regex.sh:409 txt2regex.sh:427
msgid "lowercase letters"
msgstr ""

#: txt2regex.sh:410 txt2regex.sh:429
msgid "numbers"
msgstr ""

#: txt2regex.sh:411
msgid "underscore"
msgstr ""

#: txt2regex.sh:412
msgid "space"
msgstr ""

#: txt2regex.sh:413
msgid "TAB"
msgstr ""

#: txt2regex.sh:426
msgid "letters"
msgstr ""

#: txt2regex.sh:430
msgid "letters and numbers"
msgstr ""

#: txt2regex.sh:431
msgid "hexadecimal numbers"
msgstr ""

#: txt2regex.sh:432
msgid "whitespaces (space and TAB)"
msgstr ""

#: txt2regex.sh:433
msgid "graphic chars (not-whitespace)"
msgstr ""

#: txt2regex.sh:448
msgid "quit"
msgstr ""

#: txt2regex.sh:449
msgid "reset"
msgstr ""

#: txt2regex.sh:450
msgid "color"
msgstr ""

#: txt2regex.sh:451
msgid "programs"
msgstr ""

#: txt2regex.sh:474
msgid "or"
msgstr ""

#: txt2regex.sh:475
msgid "open group"
msgstr ""

#: txt2regex.sh:476
msgid "close group"
msgstr ""

#: txt2regex.sh:483
msgid "not supported"
msgstr ""

#: txt2regex.sh:724
msgid "NOTE: . [] [^] and * are the same on all programs."
msgstr ""

#: txt2regex.sh:735 txt2regex.sh:736
msgid "NO"
msgstr ""

#: txt2regex.sh:748 txt2regex.sh:749
msgid "YES"
msgstr ""

#: txt2regex.sh:765
msgid "program"
msgstr ""

#: txt2regex.sh:766
msgid "metas"
msgstr ""

#: txt2regex.sh:767
msgid "esc meta"
msgstr ""

#: txt2regex.sh:768
msgid "need esc"
msgstr ""

#: txt2regex.sh:769
msgid "\\t in []"
msgstr ""

#: txt2regex.sh:823
msgid "Your terminal has %d lines, but txt2regex needs at least %d lines."
msgstr ""

#: txt2regex.sh:828
msgid "Increase the number of lines or select less programs using --prog."
msgstr ""

#: txt2regex.sh:829
msgid "If this line number detection is incorrect, export the LINES variable."
msgstr ""

#: txt2regex.sh:1027
msgid "which one?"
msgstr ""

#: txt2regex.sh:1043
msgid "which?"
msgstr ""

#: txt2regex.sh:1326
msgid "exit"
msgstr ""

#: txt2regex.sh:1327
msgid "press the letters to (un)select the items"
msgstr ""

#: txt2regex.sh:1505
msgid "repeated"
msgstr ""

#: txt2regex.sh:1507
msgid "times"
msgstr ""

#: txt2regex.sh:1516
msgid "Really quit?"
msgstr ""

#: txt2regex.sh:1540
msgid "no regex"
msgstr ""


================================================
FILE: tests/Dockerfile
================================================
# A handy Docker container so I can test the regex support in most of
# the programs that txt2regex supports.
#
# This is used by the tests/regex-tester.sh script.
# Use `make test-regex` to build the image and run the tests on it.

FROM ubuntu:18.04

# To avoid "Configuring tzdata" prompt
ARG DEBIAN_FRONTEND=noninteractive

# flex: gcc libc6-dev
RUN apt-get update && \
    apt-get install -y --no-install-suggests --no-install-recommends \
    chicken-bin \
    ed \
    emacs-nox \
    expect \
    flex \
    gawk \
    gcc \
    libc6-dev \
    mysql-server \
    nodejs \
    nvi \
    original-awk \
    php7.2-cli \
    postgresql \
    procmail \
    python3-minimal \
    tcl \
    vim \
    && apt-get clean && rm -rf /var/lib/apt/lists/*


================================================
FILE: tests/cmdline.md
================================================
# Command line tests for txt2regex

This is file is both documentation and a test file, showing the available command line options for txt2regex and the expected result when using them.

The [clitest](https://github.com/aureliojargas/clitest) tool can identify and run all the commands listed here and check if their actual output matches the expected one. Just run `clitest tests/cmdline.md`.

## Setup

Make sure all the commands use the same Bash version and the same txt2regex file.

```console
$ txt2regex() { bash ./txt2regex.sh "$@"; }
$
```

## Options -h, --help

```console
$ txt2regex --help | tee help.txt
usage: txt2regex [--nocolor|--whitebg] [--all|--prog PROGRAMS]
usage: txt2regex --showmeta
usage: txt2regex --showinfo PROGRAM [--nocolor]
usage: txt2regex --history VALUE [--all|--prog PROGRAMS]
usage: txt2regex --make LABEL [--all|--prog PROGRAMS]

Options:
  --all                 Select all the available programs
  --nocolor             Do not use colors
  --whitebg             Adjust colors for white background terminals
  --prog PROGRAMS       Specify which programs to use, separated by commas

  --showmeta            Print a metacharacters table featuring all the programs
  --showinfo PROGRAM    Print regex-related info about the specified program
  --history VALUE       Print a regex from the given history data
  --make LABEL          Print a ready regex for the specified label

  -V, --version         Print the program version and quit
  -h, --help            Print the help message and quit

$ txt2regex -h > h.txt
$ diff help.txt h.txt
$ rm help.txt h.txt
$
```

## Options -V, --version

```console
$ txt2regex --version
txt2regex 0.10b
$ txt2regex -V
txt2regex 0.10b
$
```

## Option --showmeta

A handy table showing all the metacharacters for all the programs txt2regex knows about. Nice for comparisons or for a quick memory refresh.

```console
$ txt2regex --showmeta

awk             +      ?             |      ()    awk version 20121220
chicken         +      ?     {}      |      ()    CHICKEN 4.12.0
ed             \+     \?   \{\}     \|    \(\)    GNU Ed 1.10
egrep           +      ?     {}      |      ()    grep (GNU grep) 3.1
emacs           +      ? \\{\\}    \\|  \\(\\)    GNU Emacs 25.2.2
expect          +      ?     {}      |      ()    expect version 5.45.4
find            +      ?     {}      |      ()    find (GNU findutils) 4.7.0-git
gawk            +      ?     {}      |      ()    GNU Awk 4.1.4
grep           \+     \?   \{\}     \|    \(\)    grep (GNU grep) 3.1
javascript      +      ?     {}      |      ()    node v8.10.0
lex             +      ?     {}      |      ()    flex 2.6.4
mawk            +      ?             |      ()    mawk 1.3.3 Nov 1996
mysql           +      ?     {}      |      ()    mysql  Ver 14.14 Distrib 5.7.29
perl            +      ?     {}      |      ()    perl v5.26.1
php             +      ?     {}      |      ()    PHP 7.2.24-0ubuntu0.18.04.4
postgres        +      ?     {}      |      ()    psql (PostgreSQL) 10.12
procmail        +      ?             |      ()    procmail v3.23pre 2001/09/13
python          +      ?     {}      |      ()    Python 3.6.9
sed            \+     \?   \{\}     \|    \(\)    sed (GNU sed) 4.4
tcl             +      ?     {}      |      ()    tcl 8.6
vi                         \{\}           \(\)    nvi 1.81.6-13
vim            \+     \=    \{}     \|    \(\)    VIM - Vi IMproved 8.0 (2016 Sep 12)

NOTE: . [] [^] and * are the same on all programs.

$
```

## Option --showinfo

Shows additional regex-related information about a specific program.

```console
$ txt2regex --showinfo sed --nocolor

   program : sed: sed (GNU sed) 4.4
     metas : . [] [^] * \+ \? \{\} \| \(\)
  esc meta : \
  need esc : \.*[
  \t in [] : YES
 [:POSIX:] : YES

$
```

Error handling:

```console
$ txt2regex --showinfo | sed 1q | cut -d : -f 1
usage
$ txt2regex --showinfo foo
ERROR: unknown program: foo
$ txt2regex --showinfo sed,python
ERROR: unknown program: sed,python
$
```

## Option --history

Every time you quit txt2regex, it shows a history string that you can inform to `--history` to replay that same regex again.

```console
$ txt2regex --history '124259¤a¤b¤5'
 Regex python: ^a+b{5}.*
 Regex egrep : ^a+b{5}.*
 Regex grep  : ^a\+b\{5\}.*
 Regex sed   : ^a\+b\{5\}.*
 Regex vim   : ^a\+b\{5}.*
 Regex emacs : ^a+b\\{5\\}.*

$
```

Note that you can also inform `--prog` to specify the list of programs (separated by a comma) to appear in the output.

```console
$ txt2regex --history '124259¤a¤b¤5' --prog sed,python,sed
 Regex sed   : ^a\+b\{5\}.*
 Regex python: ^a+b{5}.*
 Regex sed   : ^a\+b\{5\}.*

$
```

Another alternative is using `--all` to show your regex in the syntax of every program txt2regex knows about:

```console
$ txt2regex --history '124259¤a¤b¤5' --all
 Regex awk       : ^a+b!!.*
 Regex chicken   : ^a+b{5}.*
 Regex ed        : ^a\+b\{5\}.*
 Regex egrep     : ^a+b{5}.*
 Regex emacs     : ^a+b\\{5\\}.*
 Regex expect    : ^a+b{5}.*
 Regex find      : ^a+b{5}.*
 Regex gawk      : ^a+b{5}.*
 Regex grep      : ^a\+b\{5\}.*
 Regex javascript: ^a+b{5}.*
 Regex lex       : ^a+b{5}.*
 Regex mawk      : ^a+b!!.*
 Regex mysql     : ^a+b{5}.*
 Regex perl      : ^a+b{5}.*
 Regex php       : ^a+b{5}.*
 Regex postgres  : ^a+b{5}.*
 Regex procmail  : ^a+b!!.*
 Regex python    : ^a+b{5}.*
 Regex sed       : ^a\+b\{5\}.*
 Regex tcl       : ^a+b{5}.*
 Regex vi        : ^a\{1,\}b\{5\}.*
 Regex vim       : ^a\+b\{5}.*

$
```

Stress test using all the available menu options:

```console
$ txt2regex --history '111223445566778(9|9)3¤a¤bc¤de¤fg¤5¤:012345¤6¤:01234567¤7' --prog sed,vim,egrep,python,procmail
 Regex sed     : ^.a\?bc[de]\+[^fg]\{5\}[A-Za-z0-9_ \t]\{1,6\}[[:alpha:][:lower:][:upper:][:digit:][:alnum:][:xdigit:][:blank:][:graph:]]\{7,\}\(.*\|.*\)*
 Regex vim     : ^.a\=bc[de]\+[^fg]\{5}[A-Za-z0-9_ \t]\{1,6}[[:alpha:][:lower:][:upper:][:digit:][:alnum:][:xdigit:][:blank:][:graph:]]\{7,}\(.*\|.*\)*
 Regex egrep   : ^.a?bc[de]+[^fg]{5}[A-Za-z0-9_ <TAB>]{1,6}[[:alpha:][:lower:][:upper:][:digit:][:alnum:][:xdigit:][:blank:][:graph:]]{7,}(.*|.*)*
 Regex python  : ^.a?bc[de]+[^fg]{5}[A-Za-z0-9_ \t]{1,6}!!{7,}(.*|.*)*
 Regex procmail: ^.a?bc[de]+[^fg]!![A-Za-z0-9_ <TAB>]!!!!!!(.*|.*)*

$
```

Error handling:

```console
$ txt2regex --history | sed 1q | cut -d : -f 1
usage
$ txt2regex --history invalid --prog sed | sed 's/ $//'
 Regex sed:

$ txt2regex --history 2 --prog sed | sed 's/ $//'
 Regex sed:

$ txt2regex --history '1¤unused¤arguments' --prog sed | sed 's/ $//'
 Regex sed: ^

$ txt2regex --history 11 --prog sed | sed 's/ $//'  # missing repetition argument
 Regex sed: ^.

$ txt2regex --history 12 --prog sed | sed 's/ $//'  # missing char argument
 Regex sed: ^

$ txt2regex --history 13 --prog sed | sed 's/ $//'  # missing string argument
 Regex sed: ^

$ txt2regex --history 14 --prog sed | sed 's/ $//'  # missing list string argument
 Regex sed: ^[]

$ txt2regex --history 16 --prog sed | sed 's/ $//'  # missing list choice argument
 Regex sed: ^[]

$ txt2regex --history '16¤:' --prog sed | sed 's/ $//'  # empty list choice argument
 Regex sed: ^[]

$ txt2regex --history '16¤:9' --prog sed | sed 's/ $//'  # out-of-range list choice argument
 Regex sed: ^[]

$ txt2regex --history '124259¤a¤b¤5' --prog foo
ERROR: unknown program: foo
$
```

## Option --make

There are some already made regexes that txt2regex can show, use `--make` to inform which one do you want to see.

```console
$ txt2regex --make date

### date LEVEL 1: mm/dd/yyyy: matches from 00/00/0000 to 99/99/9999

 Regex python: [0-9]{2}/[0-9]{2}/[0-9]{4}
 Regex egrep : [0-9]{2}/[0-9]{2}/[0-9]{4}
 Regex grep  : [0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}
 Regex sed   : [0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}
 Regex vim   : [0-9]\{2}/[0-9]\{2}/[0-9]\{4}
 Regex emacs : [0-9]\\{2\\}/[0-9]\\{2\\}/[0-9]\\{4\\}

$
```

Adding `--prog` you can specify the exact list of programs to you want to be shown in the output:

```console
$ txt2regex --make date --prog sed,python,sed

### date LEVEL 1: mm/dd/yyyy: matches from 00/00/0000 to 99/99/9999

 Regex sed   : [0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}
 Regex python: [0-9]{2}/[0-9]{2}/[0-9]{4}
 Regex sed   : [0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}

$
```

Another alternative is using `--all` to show the regex in the syntax of every program txt2regex knows about:

```console
$ txt2regex --make number2 --all

### number LEVEL 2: level 1 plus optional float point

 Regex awk       : [+-]?[0-9]+(\.[0-9]!!)?
 Regex chicken   : [+-]?[0-9]+(\\.[0-9]{2})?
 Regex ed        : [+-]\?[0-9]\+\(\.[0-9]\{2\}\)\?
 Regex egrep     : [+-]?[0-9]+(\.[0-9]{2})?
 Regex emacs     : [+-]?[0-9]+\\(\\.[0-9]\\{2\\}\\)?
 Regex expect    : [+-]?[0-9]+(\.[0-9]{2})?
 Regex find      : [+-]?[0-9]+(\.[0-9]{2})?
 Regex gawk      : [+-]?[0-9]+(\.[0-9]{2})?
 Regex grep      : [+-]\?[0-9]\+\(\.[0-9]\{2\}\)\?
 Regex javascript: [+-]?[0-9]+(\.[0-9]{2})?
 Regex lex       : [+-]?[0-9]+(\.[0-9]{2})?
 Regex mawk      : [+-]?[0-9]+(\.[0-9]!!)?
 Regex mysql     : [+-]?[0-9]+(\\.[0-9]{2})?
 Regex perl      : [+-]?[0-9]+(\.[0-9]{2})?
 Regex php       : [+-]?[0-9]+(\\.[0-9]{2})?
 Regex postgres  : [+-]?[0-9]+(\.[0-9]{2})?
 Regex procmail  : [+-]?[0-9]+(\.[0-9]!!)?
 Regex python    : [+-]?[0-9]+(\.[0-9]{2})?
 Regex sed       : [+-]\?[0-9]\+\(\.[0-9]\{2\}\)\?
 Regex tcl       : [+-]?[0-9]+(\.[0-9]{2})?
 Regex vi        : [+-]\{0,1\}[0-9]\{1,\}\(\.[0-9]\{2\}\)\{0,1\}
 Regex vim       : [+-]\=[0-9]\+\(\.[0-9]\{2}\)\=

$
```

Available regexes to match dates: `date`, `date2` and `date3`:

```console
$ for x in date date2 date3; do txt2regex --make $x --prog python; done

### date LEVEL 1: mm/dd/yyyy: matches from 00/00/0000 to 99/99/9999

 Regex python: [0-9]{2}/[0-9]{2}/[0-9]{4}


### date LEVEL 2: mm/dd/yyyy: matches from 00/00/1000 to 19/39/2999

 Regex python: [01][0-9]/[0123][0-9]/[12][0-9]{3}


### date LEVEL 3: mm/dd/yyyy: matches from 00/00/1000 to 12/31/2999

 Regex python: (0[0-9]|1[012])/(0[0-9]|[12][0-9]|3[01])/[12][0-9]{3}

$
```

Available regexes to match time: `hour`, `hour2` and `hour3`:

```console
$ for x in hour hour2 hour3; do txt2regex --make $x --prog python; done

### hour LEVEL 1: hh:mm: matches from 00:00 to 99:99

 Regex python: [0-9]{2}:[0-9]{2}


### hour LEVEL 2: hh:mm: matches from 00:00 to 29:59

 Regex python: [012][0-9]:[012345][0-9]


### hour LEVEL 3: hh:mm: matches from 00:00 to 23:59

 Regex python: ([01][0-9]|2[0123]):[012345][0-9]

$
```

Available regexes to match numbers: `number`, `number2` and `number3`:

```console
$ for x in number number2 number3; do txt2regex --make $x --prog python; done

### number LEVEL 1: integer, positive and negative

 Regex python: [+-]?[0-9]+


### number LEVEL 2: level 1 plus optional float point

 Regex python: [+-]?[0-9]+(\.[0-9]{2})?


### number LEVEL 3: level 2 plus optional commas, like: 34,412,069.90

 Regex python: [+-]?[0-9]{1,3}(,[0-9]{3})*(\.[0-9]{2})?

$
```

Error handling:

```console
$ txt2regex --make
ERROR: --make: "": invalid argument
valid names: date date2 date3 hour hour2 hour3 number number2 number3
$ txt2regex --make foo
ERROR: --make: "foo": invalid argument
valid names: date date2 date3 hour hour2 hour3 number number2 number3
$ txt2regex --make date --prog foo

### date LEVEL 1: mm/dd/yyyy: matches from 00/00/0000 to 99/99/9999

ERROR: unknown program: foo
$
```

## Invalid option

```console
$ txt2regex --foo | head -n 3 | sed '3 s/:.*//'
--foo: invalid option

usage
$
```

## Not enough lines to draw the UI

```console
$ LINES=10 txt2regex --all | tail -n 3 | sed '1s/ [0-9][0-9]* / NN /g'
Your terminal has NN lines, but txt2regex needs at least NN lines.
Increase the number of lines or select less programs using --prog.
If this line number detection is incorrect, export the LINES variable.
$
```

## On quit, show --history and regex textual description

This is the same stress test used in the previous `--history` test, but this time feeding the commands via STDIN (simulating the user interaction) and checking only the last 3 lines of the final result.

```console
$ user_input='1112a23bc\n4de\n45fg\n55\n6abcdef.66\n7abcdefgh.77\n8(9|9)3..'
$ printf "$user_input" | txt2regex --nocolor | tail -n 3 | sed '1 s/.*txt2/txt2/'
txt2regex --history '111223445566778(9|9)3¤a¤bc¤de¤fg¤5¤:012345¤6¤:01234567¤7'

start to match on the line beginning, followed by any character, repeated one times, followed by a specific character, repeated zero or one times, followed by a literal string {bc}, followed by an allowed characters list, repeated one or more times, followed by a forbidden characters list, repeated exactly 5 times, followed by a special combination {uppercase letters, lowercase letters, numbers, underscore, space, TAB}, repeated up to 6 times, followed by a POSIX combination {letters, lowercase letters, uppercase letters, numbers, letters and numbers, hexadecimal numbers, whitespaces, graphic chars}, repeated at least 7 times, followed by a ready regex {} (, followed by anything |, followed by anything ), repeated zero or more times.
$
```


================================================
FILE: tests/features.md
================================================
# Feature tests for txt2regex

This is file is both documentation and a test file, showing how some txt2regex features work in practice, with the command line options required to trigger them and their expected result.

The [clitest](https://github.com/aureliojargas/clitest) tool can identify and run all the commands listed here and check if their actual output matches the expected one. Just run `clitest tests/features.md`.

## Setup

Make sure all the commands use the same Bash version and the same txt2regex file.

```console
$ txt2regex() { bash ./txt2regex.sh "$@"; }
$
```

## User input: Numbers — getNumber()

When informing numbers and non-numbers (`a5!6` in this test) when prompted for a number, the non-numbers are silently removed.

```console
$ txt2regex --prog egrep --history '215¤a5!6'
 Regex egrep: .{56}

$
```

## User input: Remove duplicated chars from [] — getCharList()

When informing literal characters to be put inside a `[]` list, txt2regex will deduplicate those characters, because the repetition in this case is not meaningful (`[aabbcc]` is the same as `[abc]`).

```console
$ txt2regex --prog egrep --history '24¤aabbbcab'
 Regex egrep: [abc]

$
```

## User input: Rearrange [] special elements — getCharList()

When informing literal characters to be put inside a `[]` list, some special cases have to be handled:

- `^` must not be the first char, otherwise it would mean a negated list
- `-` must not be between two other chars, otherwise it would mean a range.
- `]` must be the very first char, otherwise it would end the list prematurely.
- `[` is not special since the list is already opened, nothing to be done in this case.

```console
$ txt2regex --prog egrep --history '24¤^abc'  # move ^ to the last position
 Regex egrep: [abc^]

$ txt2regex --prog egrep --history '24¤a^bc'  # ^ is not special in the 2nd position
 Regex egrep: [a^bc]

$ txt2regex --prog egrep --history '24¤a-bc'  # move - to the last position
 Regex egrep: [abc-]

$ txt2regex --prog egrep --history '24¤-abc'  # - is not special in the 1st position
 Regex egrep: [-abc]

$ txt2regex --prog egrep --history '24¤a]bc'  # move ] to the 1st position
 Regex egrep: []abc]

$ txt2regex --prog egrep --history '24¤a[bc'  # [ is not special
 Regex egrep: [a[bc]

$ txt2regex --prog egrep --history '24¤^a[b-c]'  # everything together
 Regex egrep: []a[bc^-]

$
```

## User input: Escape \ when inside [] — escCharList()

In some programs, it's required to escape the `\` character when using it inside `[]` lists, making it `\\` or even `\\\\`.

```console
$ txt2regex --all --history '241¤\'
 Regex awk       : [\\]
 Regex chicken   : [\\\\]
 Regex ed        : [\]
 Regex egrep     : [\]
 Regex emacs     : [\\\\]
 Regex expect    : [\\]
 Regex find      : [\]
 Regex gawk      : [\\]
 Regex grep      : [\]
 Regex javascript: [\\]
 Regex lex       : [\\]
 Regex mawk      : [\\]
 Regex mysql     : [\\\\]
 Regex perl      : [\\]
 Regex php       : [\\\\]
 Regex postgres  : [\\]
 Regex procmail  : [\]
 Regex python    : [\\]
 Regex sed       : [\]
 Regex tcl       : [\\]
 Regex vi        : [\]
 Regex vim       : [\\]

$
```

## User input: Escape special chars — escChar()

The user has typed `.*+?[]{}()|^$\` as a literal string.

Every metacharacter should be escaped so it will match as a literal character.

```console
$ txt2regex --all --history '23¤.*+?[]{}()|^$\'
 Regex awk       : \.\*\+\?\[]{}\(\)\|\^\$\\
 Regex chicken   : \\.\\*\\+\\?\\[]{}\\(\\)\\|\\^\\$\\\\
 Regex ed        : \.\*+?\[]{}()|^$\\
 Regex egrep     : \.\*\+\?\[]\{}\()\|\^\$\\
 Regex emacs     : \\.\\*\\+\\?\\[]{}()|^$\\\\
 Regex expect    : \.\*\+\?\[]\{\}\(\)\|\^\$\\
 Regex find      : \.\*\+\?\[]\{}\()\|\^\$\\
 Regex gawk      : \.\*\+\?\[]{}\()\|\^\$\\
 Regex grep      : \.\*+?\[]{}()|^$\\
 Regex javascript: \.\*\+\?\[]{}\(\)\|\^\$\\
 Regex lex       : \.\*\+\?\[]\{\}\(\)\|^$\\
 Regex mawk      : \.\*\+\?\[]{}\(\)\|\^\$\\
 Regex mysql     : \\.\\*\\+\\?\\[]{}\\()\\|\\^\\$\\\\
 Regex perl      : \.\*\+\?\[]\{}\(\)\|\^\$\\
 Regex php       : \\.\\*\\+\\?\\[]\\{}\\(\\)\\|\\^\\$\\\\
 Regex postgres  : \.\*\+\?\[]{}\(\)\|\^\$\\
 Regex procmail  : \.\*\+\?\[]{}\(\)\|\^\$\\
 Regex python    : \.\*\+\?\[]\{}\(\)\|\^\$\\
 Regex sed       : \.\*+?\[]{}()|^$\\
 Regex tcl       : \.\*\+\?\[]\{\}\(\)\|\^\$\\
 Regex vi        : \.\*+?\[]{}()|^$\\
 Regex vim       : \.\*+?\[]{}()|^$\\

$
```

Now try some Bash special chars to make sure nothing will break. Those chars should not be escaped since they are not metacharacters.

```console
$ txt2regex --prog egrep --history '23¤#!&;/`"%>'
 Regex egrep: #!&;/`"%>

$
```

## User input: Use all "special combination" options — getCombo()

Turn on all the options under the "a special combination" menu.

```console
$ txt2regex --prog sed --history '26¤:012345'
 Regex sed: [A-Za-z0-9_ \t]

$
```

## User input: Use all POSIX options — getPosix()

Turn on all the options under the "a POSIX combination (locale aware)" menu.

```console
$ txt2regex --prog egrep --history '27¤:01234567'
 Regex egrep: [[:alpha:][:lower:][:upper:][:digit:][:alnum:][:xdigit:][:blank:][:graph:]]

$
```

## POSIX support — getHasPosix()

If the program does not support POSIX character classes, a `!!` string is shown instead.

```console
$ txt2regex --all --history '27¤:0'
 Regex awk       : [[:alpha:]]
 Regex chicken   : [[:alpha:]]
 Regex ed        : [[:alpha:]]
 Regex egrep     : [[:alpha:]]
 Regex emacs     : [[:alpha:]]
 Regex expect    : [[:alpha:]]
 Regex find      : [[:alpha:]]
 Regex gawk      : [[:alpha:]]
 Regex grep      : [[:alpha:]]
 Regex javascript: !!
 Regex lex       : [[:alpha:]]
 Regex mawk      : !!
 Regex mysql     : [[:alpha:]]
 Regex perl      : [[:alpha:]]
 Regex php       : [[:alpha:]]
 Regex postgres  : [[:alpha:]]
 Regex procmail  : !!
 Regex python    : !!
 Regex sed       : [[:alpha:]]
 Regex tcl       : [[:alpha:]]
 Regex vi        : [[:alpha:]]
 Regex vim       : [[:alpha:]]

$
```

## Tab inside [] — getListTab()

If the program does not support using `\t` inside `[]` lists to represent a tab character, a `<TAB>` string is shown instead.

This is a reminder for the user that this string must be replaced by a literal tab to be able to use the regex.

```console
$ txt2regex --all --history '26¤:5'
 Regex awk       : [\t]
 Regex chicken   : [\t]
 Regex ed        : [<TAB>]
 Regex egrep     : [<TAB>]
 Regex emacs     : [\t]
 Regex expect    : [\t]
 Regex find      : [<TAB>]
 Regex gawk      : [\t]
 Regex grep      : [<TAB>]
 Regex javascript: [\t]
 Regex lex       : [\t]
 Regex mawk      : [\t]
 Regex mysql     : [\t]
 Regex perl      : [\t]
 Regex php       : [\t]
 Regex postgres  : [\t]
 Regex procmail  : [<TAB>]
 Regex python    : [\t]
 Regex sed       : [\t]
 Regex tcl       : [\t]
 Regex vi        : [<TAB>]
 Regex vim       : [\t]

$
```


================================================
FILE: tests/regex-tester.sh
================================================
#!/bin/bash
# regex-tester.sh
#
# Txt2regex needs to know regex-related information for each program it
# supports. For example: the list of metacharacters, how to escape a
# metacharacter to match it literally, availability of POSIX character
# classes.
#
# Instead of relying in documentation to get that information, this
# script calls the real programs with specially crafted regexes and
# sample texts, verifying how those programs behave in "real life".
#
# The version information for each program is also extracted, so we can
# have a record of how it behaved in that specific version.
#
# To have a permanent record, the output of this script is also saved to
# this repository. This way we can detect changes in behavior when a
# program version is updated.
#
# To avoid having to install specific software in the developer machine,
# a Docker image is used to isolate all the necessary software and this
# script is run inside that image.
#
# To run this script, use `make test-regex`.

# Run this script in Bash "strict mode"
set -e -u -o pipefail

# Lots of glob-like chars here, let's avoid headaches
set -o noglob

# Set to 1 when debugging
debug=0

# Always prefer the "replace" type when the program supports both
# name, test_type
program_data='
awk             replace
chicken         replace
ed              replace
egrep           match
emacs           replace
expect          match
find            match
gawk            replace
grep            match
javascript      replace
lex             match
mawk            replace
mysql           match
perl            replace
php             replace
postgres        replace
procmail        match
python          replace
sed             replace
tcl             replace
vi              replace
vim             replace
'

# shellcheck disable=SC2016
# txt2regex-id, regex, matches
test_data='
# Tests for metacharacters: . [] ? * + {}
-           ^a.$              ab
-           ^[a]b$            ab
-           ^[^b]b$           ab
# False positive: "b\\?" matches "b" followed by zero "\", so we use "bx\\?"
S2          ^abx?$            ab
S2          ^abx\?$           ab
S2          ^abx\\?$          ab
# False positive: "b\\*" matches "b" followed by zero "\", so we use "bx\\*"
S2          ^abx*$            ab
S2          ^abx\*$           ab
S2          ^abx\\*$          ab
S2          ^ab+$             abb
S2          ^ab\+$            abb
S2          ^ab\\+$           abb
S2          ^ab{1}$           ab
S2          ^ab\{1}$          ab
S2          ^ab\{1\}$         ab
S2          ^ab\\{1\\}$       ab
S2          ^ab{1,}$          abb
S2          ^ab\{1,}$         abb
S2          ^ab\{1,\}$        abb
S2          ^ab\\{1,\\}$      abb
S2          ^ab{1,2}$         abb
S2          ^ab\{1,2}$        abb
S2          ^ab\{1,2\}$       abb
S2          ^ab\\{1,2\\}$     abb

# Tests for ax_*[1,2,3] values: ( ) |
ax123       ^a(b)$            ab
ax123       ^a\(b\)$          ab
ax123       ^a\\(b\\)$        ab
ax123       ^(x|ab)$          ab
ax123       ^\(x\|ab\)$       ab
ax123       ^\\(x\\|ab\\)$    ab

# Test for ax_*[5] values: escaping metacharacters to match them literally
# Avoid \b since it is special in most tools, use \_ instead
ax5         ^a\_$             a\_
ax5         ^a\\_$            a\_
ax5         ^a\\\\_$          a\_
ax5         ^a\.b$            a.b
ax5         ^a\\.b$           a.b
ax5         ^a*b$             a*b
ax5         ^a\*b$            a*b
ax5         ^a\\*b$           a*b
ax5         ^a[b$             a[b
ax5         ^a\[b$            a[b
ax5         ^a\\[b$           a[b
ax5         ^a]b$             a]b
ax5         ^a\]b$            a]b
ax5         ^a\\]b$           a]b
ax5         ^a{b$             a{b
ax5         ^a\{b$            a{b
ax5         ^a\\{b$           a{b
ax5         ^a}b$             a}b
ax5         ^a\}b$            a}b
ax5         ^a\\}b$           a}b
# Extra tests for { and } together, which may give different results
ax5         ^a{5}b$           a{5}b
ax5         ^a\{5\}b$         a{5}b
ax5         ^a\\{5\\}b$       a{5}b
ax5         ^a(b$             a(b
ax5         ^a\(b$            a(b
ax5         ^a\\(b$           a(b
ax5         ^a)b$             a)b
ax5         ^a\)b$            a)b
ax5         ^a\\)b$           a)b
# Grouping because ^a|b matches ^a partially when test_type=match
ax5         ^(a|b)$           (a|b)
ax5         ^\(a\|b\)$        (a|b)
ax5         ^\\(a\\|b\\)$     (a|b)
ax5         ^a+b$             a+b
ax5         ^a\+b$            a+b
ax5         ^a\\+b$           a+b
ax5         ^a?b$             a?b
ax5         ^a\?b$            a?b
ax5         ^a\\?b$           a?b
# Test ^ and $ being in the middle
ax5         ^a^b$             a^b
ax5         ^a\^b$            a^b
ax5         ^a\\^b$           a^b
ax5         ^a$b$             a$b
ax5         ^a\$b$            a$b
ax5         ^a\\$b$           a$b

# Test for ax_*[6] values: must escape \ inside [] to match it literally?
# Avoid \b since it is special in most tools, use \_ instead
ax6         ^a[\]_$           a\_
ax6         ^a[\\]_$          a\_
ax6         ^a[\\\\]_$        a\_

# Test for ax_*[7] values: POSIX support
ax7         ^a[[:alpha:]]$    ab

# Test for ax_*[8] values: \t inside [] matches a tab?
# Note that <tab> will be replaced by a real tab character later
ax8         ^a[\t]b$          a<tab>b
'

escape() { # a\b\c -> a\\b\\c
    printf '%s' "${1//\\/\\\\}"
}

# General tips for writing test_<program> functions
#
# - Avoid creating temporary files.
# - The output must be only one line, even in case of errors.
# - Always use printf, not echo.
# - When test_type=replace, the regex must be replaced by a single "x"
#   and the result is returned as the output.
# - When test_type=match, the original "string" argument should be
#   returned as the output when there's a match.
# - Always use raw strings (think Python's r"...") for the "string"
#   argument so things like "a\t" won't have the "\t" part expanded to a
#   tab, for example.
# - When raw strings are not available, use escape("$2") to make sure
#   the program will get the correct "string" argument. For example,
#   "a\t" will turn into "a\\t", which means "a", "\" and "t".
# - Check the program's most common way of specifying regexes: as a
#   string, as a raw string, inside slashes /.../, etc. The idea here is
#   testing the exact regex that the user will normally type, in the
#   most common way of doing it.
# - Be careful on shell escaping, quoting and expansion. Using stdin is
#   the safest (example: printf ... | program), since the shell will not
#   touch the text coming from stdin. The second preferred form are
#   inline arguments (example: program "..."). In both cases, pay
#   attention to the "string" argument, which may require a call to
#   escape() when there's no raw string support.
# - The worst case is nested inlining, when a tool calls another and the
#   argument may be processed twice. Avoid that, otherwise escape it.
#   No: su -c "psql -A -t -c \"SELECT ...\"" postgres
#   Yes: printf "SELECT ..." | su -c "psql -A -t" postgres

test_awk() { # regex string
    printf '%s\n' "$2" |
        original-awk "{ sub(/$1/, \"x\") ; print }" 2>&1 |
        head -n 1
}

test_chicken() { # regex string
    # No raw strings, this matches: (irregex-replace "a.b" "a\tb" "x")
    printf '(print (irregex-replace "%s" "%s" "x"))' "$1" "$(escape "$2")" |
        csi -quiet -R irregex 2>&1 |
        grep -E '^Error:|^Warning:|^x$' |
        head -n 1
}

test_ed() { # regex string
    # Open empty file, insert the string, replace, print, quit
    printf '%s\n' 0a "$2" . "1s/$1/x/" 1p Q |
        ed -s 2>&1 |
        head -n 1
}

test_emacs() { # regex string
    # No raw strings, this matches: (replace-regexp-in-string "a.b" "x" "a\tb")
    emacs -Q -batch --eval \
        "(message (replace-regexp-in-string \"$1\" \"x\" \"$(escape "$2")\"))"
}

test_expect() { # regex string
    # https://stackoverflow.com/q/37252842/
    printf '%s' "$2" | # Important: no \n here so ab$ will match
        expect -c "expect -re {$1} {puts \$expect_out(0,string)}" 2>&1 |
        head -n 1
}

test_egrep() { # regex string
    printf '%s\n' "$2" | grep -E -o "$1"
}

test_find() { # regex string
    mkdir tmp.find.$$
    cd tmp.find.$$
    touch "$2"
    # It's always a full line (path) match, so add ./ and remove ^ anchor
    find . -regextype posix-extended -regex "^\./${1#^}" 2>&1 |
        sed 's,.*/,,'
    cd ..
    rm -rf tmp.find.$$
}

test_gawk() { # regex string
    printf '%s\n' "$2" |
        gawk "{ sub(/$1/, \"x\") ; print }" 2>&1 |
        head -n 1
}

test_grep() { # regex string
    printf '%s\n' "$2" | grep -o "$1"
}

test_javascript() { # regex string
    node --eval "String.raw\`$2\`.replace(/$1/, 'x')" --print 2>&1 |
        head -n 1
}

# http://matt.might.net/articles/standalone-lexers-with-lex/
test_lex() { # regex string
    {
        # lex commands to just print the matched text
        # Got from: https://en.wikipedia.org/wiki/Lex_(software)
        printf '%s\n' '%{'
        printf '%s\n' '#include <stdio.h>'
        printf '%s\n' '%}'
        printf '%s\n' '%option noyywrap'
        printf '%s\n' '%%'
        printf '%s %s\n' "$1" '{printf("%s\n", yytext);}'
        printf '%s\n' '.|\n {}'
        printf '%s\n' '%%'
        printf '%s\n' 'int main(void){ yylex(); return 0; }'
    } > tmp.lex.$$.l
    {
        flex -o tmp.lex.$$.yy.c tmp.lex.$$.l &&
            gcc -o tmp.lex.$$.run tmp.lex.$$.yy.c &&
            printf '%s\n' "$2" | ./tmp.lex.$$.run
    } 2>&1 | head -n 1
    rm -f tmp.lex.$$.*
}

test_mawk() { # regex string
    printf '%s\n' "$2" |
        mawk "{ sub(/$1/, \"x\") ; print }" 2>&1 |
        head -n 1
}

test_mysql() { # regex string
    local result

    # Using match because replace is only supported in MySQL 8.0+
    # https://stackoverflow.com/a/49925597/
    # Strings are not raw, this matches: SELECT 'a\tb' REGEXP 'a.b'
    result=$(mysql --silent --execute "SELECT '$(escape "$2")' REGEXP '$1'")

    case "$result" in
        1)
            # Matched, show the original string (test_type=match)
            printf '%s\n' "$2"
            ;;
        *)
            printf '%s\n' "$result"
            ;;
    esac
}

test_perl() { # regex string
    printf '%s\n' "$2" | perl -pe "s/$1/x/"
}

test_php() { # regex string
    # Single quotes are not raw in PHP (\' and \\ are special)
    # https://www.php.net/manual/en/language.types.string.php
    printf "<?php echo preg_replace('/%s/', 'x', '%s'); ?>" \
        "$1" "$(escape "$2")" |
        php
}

test_postgres() { # regex string
    # Strings are raw, this matches: SELECT 'a\tb' ~ 'a..b'
    printf "SELECT regexp_replace('%s', '%s', 'x');" "$2" "$1" |
        su -c "psql -A -t" postgres
}

test_procmail() { # regex string
    local result

    {
        printf '%s\n' 'VERBOSE=y'    # show results of regex matching
        printf '%s\n' 'LOGFILE=/etc' # force error, log goes to STDERR
        printf '%s\n' ':0'           # start of a new recipe
        printf '* %s\n' "$1"         # the regex to match
        printf '%s\n' '/dev/null'    # avoid writing any file to disk
    } > tmp.procmail.$$

    # Sample output when the regex is matched:
    #
    # procmail: [20] Mon Apr 13 00:44:48 2020
    # procmail: Assigning "LOGFILE=/etc"
    # procmail: Opening "/etc"
    # procmail: Error while writing to "/etc"
    # procmail: Match on "^a"
    # procmail: Assigning "LASTFOLDER=/dev/null"
    # procmail: Opening "/dev/null"
    #   Folder: /dev/null
    result=$(
        printf '%s\n' "$2" |
            procmail ./tmp.procmail.$$ 2>&1 |
            grep -E '^procmail: (Match|No match|Invalid regexp)' |
            sed 's/^procmail: //' |
            head -n 1
    )

    case "$result" in
        Match*)
            # Matched, show the original string (test_type=match)
            printf '%s\n' "$2"
            ;;
        *)
            printf '%s\n' "$result"
            ;;
    esac

    rm tmp.procmail.$$
}

test_python() { # regex string
    printf '%s\n%s\n%s\n' \
        'import re' \
        "try: print(re.sub(r'$1', 'x', r'$2'))" \
        'except Exception as e: print(e)' | python3
}

test_sed() { # regex string
    printf '%s\n' "$2" | sed -e "s/$1/x/"
}

test_tcl() { # regex string
    # shellcheck disable=SC2016
    printf 'regsub -all {%s} "%s" "x" res; puts $res\n' "$1" "$(escape "$2")" |
        tclsh 2>&1 |
        head -n 1
}

test_vi() { # regex string
    # Open empty file, insert the string, replace, print, quit
    printf '%s\n' 0a "$2" . "1s/$1/x/" 1p q! |
        nvi -e -s |
        head -n 1
}

test_vim() { # regex string
    # Open empty file, insert the string, replace, print, quit
    printf '%s\n' 0a "$2" . "1s/$1/x/" 1p q! |
        vim --clean -n -e -s
}

test_program() {
    local program="$1"
    local test_type="$2"

    local expected
    local regex
    local result
    local string
    local tab=$'\t'

    # Special pre-tests tasks
    case "$program" in
        mysql)
            # https://github.com/moby/moby/issues/34390
            find /var/lib/mysql/mysql -exec touch -c -a {} +
            service mysql start > /dev/null
            ;;
        postgres)
            service postgresql start > /dev/null
            ;;
    esac

    printf '%s\n' "$test_data" | grep -v '^#' | grep . | while read -r id regex string; do
        printf '%-14s%-10s%-20s%-10s' "$program" "$id" "$regex" "$string"

        # Use a real tab character instead of the <tab> marker
        string="${string/<tab>/$tab}"

        case "$test_type" in
            match)
                expected="$string"
                ;;
            replace)
                # The test_* functions that perform replace operations
                # will always replace the matched regex to a single x
                # letter.
                expected="x"
                ;;
            *)
                printf 'test_program(): Unsupported test_type "%s"\n' "$test_type"
                exit 1
                ;;
        esac

        # Run the match test in $program
        case "$program" in
            vi)
                # Cannot redirect stderr when testing vi, otherwise it
                # raises the "inappropriate ioctl for device" error
                result=$("test_$program" "$regex" "$string" || true)
                ;;
            *)
                result=$("test_$program" "$regex" "$string" 2>&1 || true)
                ;;
        esac

        if test "$debug" -eq 1; then
            printf '"%s" = "%s" ' "$result" "$expected"
        fi

        if test "$result" = "$expected"; then
            printf 'OK\n'
        elif test -n "$result"; then
            printf 'FAIL %s\n' "$result"
        else
            printf 'FAIL\n'
        fi
    done

    # Special post-tests tasks
    case "$program" in
        mysql)
            service mysql stop > /dev/null
            ;;
        postgres)
            service postgresql stop > /dev/null
            ;;
    esac
}

show_version() {
    local program="$1"

    case "$program" in
        awk)
            original-awk --version
            ;;
        chicken)
            csi -release | sed 's/^/CHICKEN /'
            ;;
        ed)
            ed --version
            ;;
        egrep)
            grep -E --version
            ;;
        emacs)
            emacs --version | head -n 1
            ;;
        expect)
            expect -v
            ;;
        find)
            # shellcheck disable=SC2185
            find --version
            ;;
        lex)
            flex --version
            ;;
        gawk)
            gawk --version | sed 's/,.*//'
            ;;
        grep)
            grep --version
            ;;
        javascript)
            node --version | sed 's/^/node /'
            ;;
        mawk)
            mawk -W version 2>&1 | grep ^mawk | sed 's/,.*//'
            ;;
        mysql)
            mysql --version | sed 's/,.*//'
            ;;
        perl)
            perl --version | sed '2!d; s/).*//; s/.*(/perl /'
            ;;
        php)
            php -v | sed ' s/ (.*//'
            ;;
        procmail)
            procmail -v
            ;;
        postgres)
            psql --version | sed 's/ (Ubuntu.*//'
            ;;
        python)
            python3 --version
            ;;
        sed)
            sed --version
            ;;
        tcl)
            # shellcheck disable=SC2016
            printf 'puts $tcl_version' | tclsh | sed 's/^/tcl /'
            ;;
        vi)
            dpkg-query --showformat='${Package} ${Version}\n' --show nvi
            ;;
        vim)
            vim --version | sed 's/,.*/)/'
            ;;
        *)
            printf 'show_version(): Unknown program "%s"\n' "$program"
            exit 1
            ;;
    esac 2>&1 | head -n 1
}

main() {
    local program
    local skip=
    local test_type
    local user_program=

    while test $# -gt 0; do
        case "$1" in
            --skip)
                skip="$2"
                shift
                ;;
            *)
                user_program="$1"
                ;;
        esac
        shift
    done

    # Restrict the available programs to the user's choice
    test -n "$user_program" &&
        program_data=$(printf '%s\n' "$program_data" | grep "^$user_program ")

    # Show version and test results for all the available programs
    printf '%s\n' "$program_data" | grep . | while read -r program test_type; do

        test "$program" = "$skip" && continue

        printf '%s version: ' "$program"
        show_version "$program" || true

        test_program "$program" "$test_type"
        printf '%s\n' ----------------------------------------------------------
    done
}

main "$@"


================================================
FILE: tests/regex-tester.txt
================================================
awk version: awk version 20121220
awk           -         ^a.$                ab        OK
awk           -         ^[a]b$              ab        OK
awk           -         ^[^b]b$             ab        OK
awk           S2        ^abx?$              ab        OK
awk           S2        ^abx\?$             ab        FAIL ab
awk           S2        ^abx\\?$            ab        FAIL ab
awk           S2        ^abx*$              ab        OK
awk           S2        ^abx\*$             ab        FAIL ab
awk           S2        ^abx\\*$            ab        FAIL ab
awk           S2        ^ab+$               abb       OK
awk           S2        ^ab\+$              abb       FAIL abb
awk           S2        ^ab\\+$             abb       FAIL abb
awk           S2        ^ab{1}$             ab        FAIL ab
awk           S2        ^ab\{1}$            ab        FAIL ab
awk           S2        ^ab\{1\}$           ab        FAIL ab
awk           S2        ^ab\\{1\\}$         ab        FAIL ab
awk           S2        ^ab{1,}$            abb       FAIL abb
awk           S2        ^ab\{1,}$           abb       FAIL abb
awk           S2        ^ab\{1,\}$          abb       FAIL abb
awk           S2        ^ab\\{1,\\}$        abb       FAIL abb
awk           S2        ^ab{1,2}$           abb       FAIL abb
awk           S2        ^ab\{1,2}$          abb       FAIL abb
awk           S2        ^ab\{1,2\}$         abb       FAIL abb
awk           S2        ^ab\\{1,2\\}$       abb       FAIL abb
awk           ax123     ^a(b)$              ab        OK
awk           ax123     ^a\(b\)$            ab        FAIL ab
awk           ax123     ^a\\(b\\)$          ab        FAIL ab
awk           ax123     ^(x|ab)$            ab        OK
awk           ax123     ^\(x\|ab\)$         ab        FAIL ab
awk           ax123     ^\\(x\\|ab\\)$      ab        FAIL ab
awk           ax5       ^a\_$               a\_       FAIL a\_
awk           ax5       ^a\\_$              a\_       OK
awk           ax5       ^a\\\\_$            a\_       FAIL a\_
awk           ax5       ^a\.b$              a.b       OK
awk           ax5       ^a\\.b$             a.b       FAIL a.b
awk           ax5       ^a*b$               a*b       FAIL a*b
awk           ax5       ^a\*b$              a*b       OK
awk           ax5       ^a\\*b$             a*b       FAIL a*b
awk           ax5       ^a[b$               a[b       FAIL original-awk: nonterminated character class ^a[b$
awk           ax5       ^a\[b$              a[b       OK
awk           ax5       ^a\\[b$             a[b       FAIL original-awk: nonterminated character class ^a\\[b$
awk           ax5       ^a]b$               a]b       OK
awk           ax5       ^a\]b$              a]b       OK
awk           ax5       ^a\\]b$             a]b       FAIL a]b
awk           ax5       ^a{b$               a{b       OK
awk           ax5       ^a\{b$              a{b       OK
awk           ax5       ^a\\{b$             a{b       FAIL a{b
awk           ax5       ^a}b$               a}b       OK
awk           ax5       ^a\}b$              a}b       OK
awk           ax5       ^a\\}b$             a}b       FAIL a}b
awk           ax5       ^a{5}b$             a{5}b     OK
awk           ax5       ^a\{5\}b$           a{5}b     OK
awk           ax5       ^a\\{5\\}b$         a{5}b     FAIL a{5}b
awk           ax5       ^a(b$               a(b       FAIL original-awk: syntax error in regular expression ^a(b$ at 
awk           ax5       ^a\(b$              a(b       OK
awk           ax5       ^a\\(b$             a(b       FAIL original-awk: syntax error in regular expression ^a\\(b$ at 
awk           ax5       ^a)b$               a)b       FAIL original-awk: syntax error in regular expression ^a)b$ at b$
awk           ax5       ^a\)b$              a)b       OK
awk           ax5       ^a\\)b$             a)b       FAIL original-awk: syntax error in regular expression ^a\\)b$ at b$
awk           ax5       ^(a|b)$             (a|b)     FAIL (a|b)
awk           ax5       ^\(a\|b\)$          (a|b)     OK
awk           ax5       ^\\(a\\|b\\)$       (a|b)     FAIL (a|b)
awk           ax5       ^a+b$               a+b       FAIL a+b
awk           ax5       ^a\+b$              a+b       OK
awk           ax5       ^a\\+b$             a+b       FAIL a+b
awk           ax5       ^a?b$               a?b       FAIL a?b
awk           ax5       ^a\?b$              a?b       OK
awk           ax5       ^a\\?b$             a?b       FAIL a?b
awk           ax5       ^a^b$               a^b       FAIL original-awk: syntax error in regular expression ^a^b$ at b$
awk           ax5       ^a\^b$              a^b       OK
awk           ax5       ^a\\^b$             a^b       FAIL original-awk: syntax error in regular expression ^a\\^b$ at b$
awk           ax5       ^a$b$               a$b       FAIL a$b
awk           ax5       ^a\$b$              a$b       OK
awk           ax5       ^a\\$b$             a$b       FAIL a$b
awk           ax6       ^a[\]_$             a\_       FAIL original-awk: nonterminated character class ^a[\]_$
awk           ax6       ^a[\\]_$            a\_       OK
awk           ax6       ^a[\\\\]_$          a\_       OK
awk           ax7       ^a[[:alpha:]]$      ab        OK
awk           ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
chicken version: CHICKEN 4.12.0
chicken       -         ^a.$                ab        OK
chicken       -         ^[a]b$              ab        OK
chicken       -         ^[^b]b$             ab        OK
chicken       S2        ^abx?$              ab        OK
chicken       S2        ^abx\?$             ab        FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\?
chicken       S2        ^abx\\?$            ab        FAIL
chicken       S2        ^abx*$              ab        OK
chicken       S2        ^abx\*$             ab        FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\*
chicken       S2        ^abx\\*$            ab        FAIL
chicken       S2        ^ab+$               abb       OK
chicken       S2        ^ab\+$              abb       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\+
chicken       S2        ^ab\\+$             abb       FAIL
chicken       S2        ^ab{1}$             ab        OK
chicken       S2        ^ab\{1}$            ab        FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken       S2        ^ab\{1\}$           ab        FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken       S2        ^ab\\{1\\}$         ab        FAIL
chicken       S2        ^ab{1,}$            abb       OK
chicken       S2        ^ab\{1,}$           abb       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken       S2        ^ab\{1,\}$          abb       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken       S2        ^ab\\{1,\\}$        abb       FAIL
chicken       S2        ^ab{1,2}$           abb       OK
chicken       S2        ^ab\{1,2}$          abb       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken       S2        ^ab\{1,2\}$         abb       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken       S2        ^ab\\{1,2\\}$       abb       FAIL
chicken       ax123     ^a(b)$              ab        OK
chicken       ax123     ^a\(b\)$            ab        FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\(
chicken       ax123     ^a\\(b\\)$          ab        FAIL
chicken       ax123     ^(x|ab)$            ab        OK
chicken       ax123     ^\(x\|ab\)$         ab        FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\(
chicken       ax123     ^\\(x\\|ab\\)$      ab        FAIL
chicken       ax5       ^a\_$               a\_       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\_
chicken       ax5       ^a\\_$              a\_       FAIL
chicken       ax5       ^a\\\\_$            a\_       OK
chicken       ax5       ^a\.b$              a.b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\.
chicken       ax5       ^a\\.b$             a.b       OK
chicken       ax5       ^a*b$               a*b       FAIL
chicken       ax5       ^a\*b$              a*b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\*
chicken       ax5       ^a\\*b$             a*b       OK
chicken       ax5       ^a[b$               a[b       FAIL Error: incomplete char set
chicken       ax5       ^a\[b$              a[b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\[
chicken       ax5       ^a\\[b$             a[b       OK
chicken       ax5       ^a]b$               a]b       OK
chicken       ax5       ^a\]b$              a]b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\]
chicken       ax5       ^a\\]b$             a]b       OK
chicken       ax5       ^a{b$               a{b       OK
chicken       ax5       ^a\{b$              a{b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken       ax5       ^a\\{b$             a{b       OK
chicken       ax5       ^a}b$               a}b       OK
chicken       ax5       ^a\}b$              a}b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\}
chicken       ax5       ^a\\}b$             a}b       OK
chicken       ax5       ^a{5}b$             a{5}b     FAIL
chicken       ax5       ^a\{5\}b$           a{5}b     FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\{
chicken       ax5       ^a\\{5\\}b$         a{5}b     OK
chicken       ax5       ^a(b$               a(b       FAIL Error: unterminated parenthesis in regexp: "^a(b$"
chicken       ax5       ^a\(b$              a(b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\(
chicken       ax5       ^a\\(b$             a(b       OK
chicken       ax5       ^a)b$               a)b       FAIL Error: too many )'s in regexp: "^a)b$"
chicken       ax5       ^a\)b$              a)b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\)
chicken       ax5       ^a\\)b$             a)b       OK
chicken       ax5       ^(a|b)$             (a|b)     FAIL
chicken       ax5       ^\(a\|b\)$          (a|b)     FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\(
chicken       ax5       ^\\(a\\|b\\)$       (a|b)     OK
chicken       ax5       ^a+b$               a+b       FAIL
chicken       ax5       ^a\+b$              a+b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\+
chicken       ax5       ^a\\+b$             a+b       OK
chicken       ax5       ^a?b$               a?b       FAIL
chicken       ax5       ^a\?b$              a?b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\?
chicken       ax5       ^a\\?b$             a?b       OK
chicken       ax5       ^a^b$               a^b       FAIL
chicken       ax5       ^a\^b$              a^b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\^
chicken       ax5       ^a\\^b$             a^b       OK
chicken       ax5       ^a$b$               a$b       FAIL
chicken       ax5       ^a\$b$              a$b       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\$
chicken       ax5       ^a\\$b$             a$b       OK
chicken       ax6       ^a[\]_$             a\_       FAIL Warning: undefined escape sequence in string - probably forgot backslash: #\]
chicken       ax6       ^a[\\]_$            a\_       FAIL Error: incomplete char set
chicken       ax6       ^a[\\\\]_$          a\_       OK
chicken       ax7       ^a[[:alpha:]]$      ab        OK
chicken       ax8       ^a[\t]b$            a<tab>b   OK
----------------------------------------------------------
ed version: GNU Ed 1.10
ed            -         ^a.$                ab        OK
ed            -         ^[a]b$              ab        OK
ed            -         ^[^b]b$             ab        OK
ed            S2        ^abx?$              ab        FAIL ?
ed            S2        ^abx\?$             ab        OK
ed            S2        ^abx\\?$            ab        FAIL ?
ed            S2        ^abx*$              ab        OK
ed            S2        ^abx\*$             ab        FAIL ?
ed            S2        ^abx\\*$            ab        FAIL ?
ed            S2        ^ab+$               abb       FAIL ?
ed            S2        ^ab\+$              abb       OK
ed            S2        ^ab\\+$             abb       FAIL ?
ed            S2        ^ab{1}$             ab        FAIL ?
ed            S2        ^ab\{1}$            ab        FAIL ?
ed            S2        ^ab\{1\}$           ab        OK
ed            S2        ^ab\\{1\\}$         ab        FAIL ?
ed            S2        ^ab{1,}$            abb       FAIL ?
ed            S2        ^ab\{1,}$           abb       FAIL ?
ed            S2        ^ab\{1,\}$          abb       OK
ed            S2        ^ab\\{1,\\}$        abb       FAIL ?
ed            S2        ^ab{1,2}$           abb       FAIL ?
ed            S2        ^ab\{1,2}$          abb       FAIL ?
ed            S2        ^ab\{1,2\}$         abb       OK
ed            S2        ^ab\\{1,2\\}$       abb       FAIL ?
ed            ax123     ^a(b)$       
Download .txt
gitextract_8nv6xu98/

├── .devcontainer/
│   └── devcontainer.json
├── .github/
│   └── workflows/
│       └── check.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── COPYRIGHT
├── Makefile
├── README.md
├── TODO
├── man/
│   ├── txt2regex.html
│   ├── txt2regex.man
│   └── txt2regex.t2t
├── po/
│   ├── ca.po
│   ├── de_DE.po
│   ├── es_ES.po
│   ├── fr_FR.po
│   ├── id_ID.po
│   ├── it_IT.po
│   ├── ja.po
│   ├── pl_PL.po
│   ├── pt_BR.po
│   ├── ro_RO.po
│   ├── tr.po
│   └── txt2regex.pot
├── tests/
│   ├── Dockerfile
│   ├── cmdline.md
│   ├── features.md
│   ├── regex-tester.sh
│   └── regex-tester.txt
└── txt2regex.sh
Condensed preview — 29 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (367K chars).
[
  {
    "path": ".devcontainer/devcontainer.json",
    "chars": 442,
    "preview": "// https://aka.ms/devcontainer.json\n{\n    \"name\": \"txt2regex dev\",\n    \"image\": \"ghcr.io/aureliojargas/devcontainer\",\n  "
  },
  {
    "path": ".github/workflows/check.yml",
    "chars": 678,
    "preview": "# https://docs.github.com/en/actions/reference\n\nname: Check\non:\n  push:\n  pull_request:\njobs:\n\n  lint:\n    runs-on: ubun"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 10489,
    "preview": "# Changelog for txt2regex\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on "
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 6238,
    "preview": "# Contributing to txt2regex\n\nPlease follow the usual GitHub workflow to contribute to this project:\n\n- Use [GitHub issue"
  },
  {
    "path": "COPYRIGHT",
    "chars": 18092,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
  },
  {
    "path": "Makefile",
    "chars": 4858,
    "preview": "NAME = txt2regex\nVERSION = 0.10b\nBASHVERSIONS = 3.0 3.1 3.2 4.0 4.1 4.2 4.3 4.4 5.0 5.1\nREGEXTESTERIMAGE = aureliojargas"
  },
  {
    "path": "README.md",
    "chars": 6430,
    "preview": "## txt2regex — Regular expression wizard for the command line\n\n![](https://aurelio.net/projects/txt2regex/img/demo.gif)\n"
  },
  {
    "path": "TODO",
    "chars": 896,
    "preview": "txt2regex TODO:\n\n  - new programs: expr, oawk, nawk, MKS awk, ruby, bash, java, html5, lua\n  - add support for \\<borders"
  },
  {
    "path": "man/txt2regex.html",
    "chars": 6497,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n<title>TXT2REGEX</title>\n<meta name=\"generator\" content=\"http://txt2tags.org\">\n<style>\nbod"
  },
  {
    "path": "man/txt2regex.man",
    "chars": 4057,
    "preview": ".TH \"TXT2REGEX\" 1 \"May 21, 2020\" \"\"\n\n.SH NAME\n.P\n\\fBtxt2regex\\fR \\-\\- console regular expression wizard\n.SH SYNOPSIS\n.P\n"
  },
  {
    "path": "man/txt2regex.t2t",
    "chars": 3874,
    "preview": "TXT2REGEX\n\nMay 21, 2020\n\n%!target: man\n%!options(man) : -o txt2regex.man\n%!options(html): -o txt2regex.html --mask-email"
  },
  {
    "path": "po/ca.po",
    "chars": 6716,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.9\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/de_DE.po",
    "chars": 6513,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.5\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/es_ES.po",
    "chars": 6646,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.7\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/fr_FR.po",
    "chars": 6839,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.9\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/id_ID.po",
    "chars": 8180,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.3\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/it_IT.po",
    "chars": 7199,
    "preview": "# Translator: Daniele Pizzolli\n# Revision  : Marco Pagnanini\n#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.7\\n\"\n"
  },
  {
    "path": "po/ja.po",
    "chars": 5577,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.6\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/pl_PL.po",
    "chars": 6641,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.5\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/pt_BR.po",
    "chars": 6825,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.6\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/ro_RO.po",
    "chars": 8956,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.7\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/tr.po",
    "chars": 6480,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.9\\n\"\n\"POT-Creation-Date: 2020-05-17 07:16 CEST\\n\"\n\"PO-Revision-Date:"
  },
  {
    "path": "po/txt2regex.pot",
    "chars": 5243,
    "preview": "#, fuzzy\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: txt2regex 0.9\\n\"\n\"POT-Creation-Date: 2020-05-21 00:49 CEST\\n\"\n\"PO-Revis"
  },
  {
    "path": "tests/Dockerfile",
    "chars": 752,
    "preview": "# A handy Docker container so I can test the regex support in most of\n# the programs that txt2regex supports.\n#\n# This i"
  },
  {
    "path": "tests/cmdline.md",
    "chars": 13060,
    "preview": "# Command line tests for txt2regex\n\nThis is file is both documentation and a test file, showing the available command li"
  },
  {
    "path": "tests/features.md",
    "chars": 6836,
    "preview": "# Feature tests for txt2regex\n\nThis is file is both documentation and a test file, showing how some txt2regex features w"
  },
  {
    "path": "tests/regex-tester.sh",
    "chars": 17814,
    "preview": "#!/bin/bash\n# regex-tester.sh\n#\n# Txt2regex needs to know regex-related information for each program it\n# supports. For "
  },
  {
    "path": "tests/regex-tester.txt",
    "chars": 118064,
    "preview": "awk version: awk version 20121220\nawk           -         ^a.$                ab        OK\nawk           -         ^[a]b"
  },
  {
    "path": "txt2regex.sh",
    "chars": 42851,
    "preview": "#!/bin/bash\n# txt2regex.sh - Regular Expressions \"wizard\" made with Bash builtins\n#\n# Website : https://aurelio.net/proj"
  }
]

About this extraction

This page contains the full source code of the aureliojargas/txt2regex GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 29 files (335.7 KB), approximately 104.6k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!