Sunday, 8 September 2013

Checking if char is within set

Checking if char is within set

I'm trying to check if some string from length 1 and has only following
chars: [RGWBO].
I'm trying the following but it doesn't work, what am I missing?
if [[ !(${line[4]} =~ [RGWBO]) ]];

No comments:

Post a Comment