Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pedsmoreira/strex
String Expressions: human-readable approach to using RegEx in text files
https://github.com/pedsmoreira/strex
regex regex-match string string-matching
Last synced: about 2 months ago
JSON representation
String Expressions: human-readable approach to using RegEx in text files
- Host: GitHub
- URL: https://github.com/pedsmoreira/strex
- Owner: pedsmoreira
- License: mit
- Created: 2023-03-09T17:15:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-13T21:56:36.000Z (9 months ago)
- Last Synced: 2024-07-22T00:35:33.366Z (2 months ago)
- Topics: regex, regex-match, string, string-matching
- Language: TypeScript
- Homepage:
- Size: 188 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# strex
String Expressions: human-readable alternative to RegEx
## Introduction
_strex_ (String Expressions) is a toolkit with it's own pattern for searching and replacing text using a human-readable pattern of text and variable.
RegEx is very powerful but it is also very difficult to write and read, specially when it comes to manipulating an entire text file.
_strex_ was designed to work similarly to how humans think, it makes it easier to put together pieces of text and variables that can latter be replaced, this is useful both for performing searching and manipulating large sets of text (such as a codebase).
On _strex_ variables are represented by `@{{ variable }}` and can be intertwined with text. Finding all key value pairs in a JSON file for example can be represented as:
```ts
"@{{ name }}": "@{{value}}"
```## Install
```zsh
npm install --save strex
```