Skip to content

Commit 3e58f83

Browse files
committed
Added --standalone option (default: true)
1 parent 098d709 commit 3e58f83

File tree

5 files changed

+82
-77
lines changed

5 files changed

+82
-77
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,28 @@ build-regexp 0.4.3
2727
Strings can be specified either directly in the command invocation or via an input file. The following shell example shows how to pass them in the command invocation as a space-separated list:
2828
```
2929
$ ./build-regexp.phar foo bar baz
30-
(?:ba[rz]|foo)
30+
ba[rz]|foo
3131
```
3232

3333
In the following example, we create a file with each value on its own line, then we pass the name of the file via the `infile` option:
3434
```
3535
$ echo -e "one\ntwo\nthree" > strings.txt
3636
$ ./build-regexp.phar --infile strings.txt
37-
(?:one|t(?:hree|wo))
37+
one|t(?:hree|wo)
3838
```
3939

4040
Alternatively, the list of strings can be passed as a JSON array:
4141
```
4242
$ echo '["foo","bar"]' > strings.json
4343
$ ./build-regexp.phar --infile strings.json --infile-format json
44-
(?:bar|foo)
44+
bar|foo
4545
```
4646

4747
By default, the result is output in the terminal directly. Alternatively, it can be saved to a file specified via the `outfile` option. In the following example, we save the result to a `out.txt` file before checking its content:
4848
```
4949
$ ./build-regexp.phar --outfile out.txt foo bar baz
5050
$ cat out.txt
51-
(?:ba[rz]|foo)
51+
ba[rz]|foo
5252
```
5353

5454

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "MIT",
77
"require": {
88
"php": ">=8.1",
9-
"s9e/regexp-builder": "^1.4",
9+
"s9e/regexp-builder": "^2.0",
1010
"symfony/console": "^6.0"
1111
},
1212
"require-dev": {
@@ -27,5 +27,6 @@
2727
"build-phar": "php bin/box.phar compile",
2828
"test": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text"
2929
},
30+
"minimum-stability": "beta",
3031
"bin": ["bin/build-regexp"]
3132
}

composer.lock

Lines changed: 54 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)