This might work `(?!\d+)(\w+)`: http://rubular.com/r/6hXhVPW4gy, using lookahead to skip sections only containing digits.