Mode with regex and match

Hello.

I create my own mode for a markup language. With stream.match(regex), I look for the expression //trick// (code used to form <em>trick</em>, in HTML). I’d like the pair of // to have a style A and trick, a style B.

Actually, I can give a unique style to the whole.

if (stream.match(/\/\/(.*?)\/\//)) {
    return 'B'
}

Help me please :blush: