Regular Expression question
Posted
by Mohammad Kotb
on Stack Overflow
See other posts from Stack Overflow
or by Mohammad Kotb
Published on 2010-04-26T22:55:44Z
Indexed on
2010/04/26
23:13 UTC
Read the original article
Hit count: 320
regular-expression
|homework
Hi,
In my academic assignment, I want make a regular expression to match a word with the following specifications: word length greater than or equal 1 and less than or equal 8 contains letters, digits, and underscore first digit is a letter only word is not A,X,S,T or PC,SW
I tried for this regex but can't continue (My big problem is to make the word not equal to PC and SW) ([a-zA-Z&&[^AXST]])|([a-zA-Z][\w]{0,7})
But in the previous regex I didn't handle the that it is not PC and SW
Thanks,
© Stack Overflow or respective owner