Concept Flow - Regex in [[ ]] with =~
Start
Evaluate string
Evaluate regex pattern
Use [[ string =~ regex
If match: return true
If no match: return false
Use result in if/else or variable
End
The shell evaluates the string and regex pattern inside [[ ]]. It tests if the string matches the regex using =~, then returns true or false for conditional use.