I would like to valid a string if it consists of M or F. If possible i would also like to know if some one enters Male or Female i would like to get the result as M or F.. But my first case is to check whether the string has M or F. In any other character i would like to make my result as false.
I would like to valid a string if it consists of M or F
Share
Try this –