py-regex-replace/test/test_multiline_pattern.sh
2022-10-17 22:02:36 +02:00

13 lines
261 B
Bash

#!/usr/bin/env sh
string='alpha = a
beta = b
Exec = foo bar baz
end = EOF'
pattern='= b\nExec ='
repl='='
string="$(printf '%s' "${string}" | ../src/py_regex_replace/main.py -p "${pattern}" -r "${repl}" -c 1)"
printf 'RESULT>>>\n%s\n<<<RESULT\n' "${string}"