From 2c2b23e9d33a09d8345c0f473bc789ef4f741528 Mon Sep 17 00:00:00 2001 From: M0S111 <120295443+M0S111@users.noreply.github.com> Date: Wed, 22 Jan 2025 16:54:35 +0500 Subject: [PATCH] Updated bash.sh; added POSIX character classes for pattern matching --- languages/bash.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/languages/bash.sh b/languages/bash.sh index 769c31d..180f917 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -259,6 +259,17 @@ $(UNIX command) # command substitution: runs the command and return typeset -l # makes variable local - must be an interger +######################### +# POSIX Character Classes +######################### + +[:alnum:] # Alphanumeric characters +[:alpha:] # Alphabetic characters +[:digit:] # Numerals +[:upper:] # Uppercase alphabetic characters +[:lower:] # Lowercase alphabetic characters +[!characters] # Matches any character that is not a member of the set characters + ############################################################################## # FUNCTIONS ##############################################################################