mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-11 22:43:47 -05:00
initial commit
This commit is contained in:
@@ -218,7 +218,7 @@ _regex_() {
|
||||
# $2 (Required) - Regex pattern
|
||||
# OUTS: Prints string matching regex
|
||||
# Returns error if no part of string did not match regex
|
||||
# USAGE: regex "#FFFFFF" '^(#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3}))$' || echo "no match found"
|
||||
# USAGE: _regex_ "#FFFFFF" '^(#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3}))$'
|
||||
# NOTE: This example only prints the first matching group. When using multiple capture
|
||||
# groups some modification is needed.
|
||||
# https://github.com/dylanaraps/pure-bash-bible
|
||||
|
||||
Reference in New Issue
Block a user