tdenniston / bish

Bish is a language that compiles to Bash. It's designed to give shell scripting a more comfortable and modern feel.
MIT License
1.48k stars 36 forks source link

Implement =~ operator for [[-based regex matching. #55

Open HyperHCl opened 9 years ago

HyperHCl commented 9 years ago

Bash's [[ builtin provides various extensions and improvements, include the regex-matching [[ str =~ regex ]].

For other shells, we can wrap it up like echo 'str' | grep -o 'regex' and send it to an array (emulated or shell native), just like bash uses BASH_REMATCH.

tdenniston commented 9 years ago

This is a good idea, but I think it will wait until version 0.2.