views:

293

answers:

3
+1  A: 

Use this to test them out and find for your self..

http://www.gskinner.com/RegExr/

(not mine or affiliated .. just a great tool)

Gaby
A: 

I think is [^ABCD] :)

Aito
If you are joking, add a fineprint that says so - even a winking-emoticon would do. Otherwise, WHAT?
Amarghosh
@Amarghosh - Sorry, you're right. I'm learning :)
Aito
Okay, I was joking about the emoticon thing - jokes should go in comments. Please delete this answer as it is wrong and hence adds no value to the site (FWIW, deleting will give you back those two reputation points you lost with my down-vote).
Amarghosh
@Amarghosh: If you need punctuation to spell it out for you, you need to brush up on your regex.
Anonymous
@Amarghosh: What I want to express is that I think that none of the answers are correct (not A, not B, not C and not D).
Aito
@Anon Jokes and puns have a place in SO: Comments.
Amarghosh
A: 

Two of the choices match all strings consisting only of alphanumeric characters. Neither of those match only strings consisting of alphanumeric characters.

One of the other two matches some, but not all, strings consisting of only alphanumeric characters.

The other matches strings beginning with a particular string which include the dash character, which precludes matching only alphanumeric strings.

A pattern matching only nonempty strings of alphanumeric characters includes the following: /\A[a-zA-Z0-9]+\z/

Anonymous