s = '[hello-ci.yml ci] works fine for this [second-DONT-EXTRACT-hello-ci.yml ci]'puts s[/\[([^\]\[]*[ _-]ci)\]/i, 1] # => hello-ci.yml ci
Standard input is empty
hello-ci.yml ci
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!