I am struggling to write a Ruby regexp that will match all words which: starts with 2 or 3 letters, then have backslash (\
) and then have 7 or 8 letters and digits. The expression I use is like this:
p "BFD\082BBSA".match %r{\A[a-zA-Z]{2,3}\/[a-zA-Z0-9]{7,8}\z}
But each time this code returns nil
. What am I doing wrong?