how I can to match spaces in stream in codemirror?

I am using codemirror , I want to color word in blue if the word came after “(” and to color the word in red other cases , Example : the following cases I want to color the word (apple) in blue:
(apple
( apple
( apple so I want to skip the spaces between the “(” and the “apple"
in other cases I want to color the “apple” in red color :
apple
My Problem is : I write code and it work fine , But it not work when spaces came between the “(” and “apple” , I try to skip the spaces using the regular expression (/[\s]+/) But it not work I try to write :
if ( stream.match(”("+/[\s]+/+“apple”))
{
return “style2”;
}
here my try : http://jsfiddle.net/TcqAf/652/
so I want to skip all spaces came between the “(” and “apple” , can any body help ?

Parentheses have special meaning in regexps. Also, I don’t know what you’re trying to do with the plus signs there. Try stream.match(/^\(\s*apple/)

thank you very much @marijn it work , I write :

  if ( stream.match(/^\(\s*/) && stream.match("apple"))
         {
          return "style2";
         }  

this is the link of update : http://jsfiddle.net/TcqAf/655/

and it work fine , But I have one problem the character “(” color in blue also , I want to color the only the word “apple” in blue color and to color the character “(” in different color (for example color the “(” in green color ) can I do it or I can not ?

You can do that, but you’d have to keep state in your mode, so that it knows that the last non-whitespace token it saw was an opening parenthesis.

I find this sample ,But this not for color specific character like “(”, this is the link http://marijnhaverbeke.nl/blog/codemirror-mode-system.html