This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
test_regex () { | |
REGEX="$1"; | |
TEST_STRINGS="$2"; | |
[ -n "$3" ] && [ "$3" = "expect_no_match" ] && SHOW_NON_MATCHING="-v"; | |
# find IP addresses anywhere in the string | |
# but avoid certain characters in the beginning and end |