RSS feed for blog Linkin Skype Mail Me Twitter

Stickfight

Check for yes and no

Tiny code snippit, you can use regex to check for any variation of Yes or No in java like this

“STRING”.matches(“[nN]|[nN][oO]”)

“STRING”.matches(“[yY]|[yY][eE][sS]”)

this finds “N”:”n”:”NO”:”No”:”no” etc etc etc

useful.

Leave Your Comments

blog comments powered by Disqus

Related Entries

Check for yes and no

Latest Blogs