Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulschuberth/regex-extract-action
https://github.com/paulschuberth/regex-extract-action
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/paulschuberth/regex-extract-action
- Owner: paulschuberth
- License: mit
- Created: 2022-11-30T21:54:14.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-20T09:26:23.000Z (11 days ago)
- Last Synced: 2024-12-23T06:14:55.973Z (8 days ago)
- Language: TypeScript
- Size: 1.91 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Regex Extract Action
This action can be used to find occurences of a regular expression with a text.
## Inputs
### haystack
The text in which to search for matches of the reqular expression. This input is required.
### needle
The regular expression that is used to find matched. The default value, `[A-Z]+-\d+`, works
fine for JIRA issues. This input is optional.### mode
The mode in which to run this action. Possible values are `all`, `unique`, and `first`. They make the
action write all matches, unique matches, or only the first match to the `matches` output, respectively.
The default value is `unique`. This input is optional.### until
If set, this action only searches from the beginning of the original `haystack` until the first match of
`until`. This may be a regular expression. If it is not set, the entire haystack is searched. This input is optional.## Outputs
### matches
A JSON list of all matches. The list is empty if there are no matches.
### has_matches
A boolean indicating whether any matches were found.
## Example usage
The [example workflow](https://github.com/paulschuberth/regex-extract-action/blob/main/.github/workflows/example.yml) in
this repo shows one example of how to use this action.