I’m working in bash, chosen mainly so I could get some practice with it, and I have a string that I know matches the regex [:blank:]+([0-9]+)[:blank:]+([0-9]+)[:blank:]+$SOMETHING, assuming I got that right. (Whitespace, digits, whitespace, digits, whitespace, some string I’ve previously defined.) By “matches,” I mean it includes this format as a substring.
Is there a way to set the two strings of digits to specific variables with just one regex matching?
$BASH_REMATCHcontains the groups from the latest regex comparison done by[[.