tag:blogger.com,1999:blog-28228406.post114882388401785222..comments2024-03-27T00:44:17.190-04:00Comments on Java How To ...: 1-Minute Quiz: Why is Hyphen Illegal in Identifier?Unknownnoreply@blogger.comBlogger4125tag:blogger.com,1999:blog-28228406.post-58296777056498311182008-11-06T22:09:00.000-05:002008-11-06T22:09:00.000-05:00some times you can, not exactly compare but check ...some times you can, not exactly compare but check for hyphen in string. <BR/>eg; Pattern.compile("[a-zA-Z0-9,\\._`\' -]*");<BR/><BR/>but location of hyphen might matter. like placing it at last works.amarhttps://www.blogger.com/profile/14577047732656700334noreply@blogger.comtag:blogger.com,1999:blog-28228406.post-1148897576242024522006-05-29T06:12:00.000-04:002006-05-29T06:12:00.000-04:00This comment has been removed by a blog administrator.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-28228406.post-1148844473731848182006-05-28T15:27:00.000-04:002006-05-28T15:27:00.000-04:00"-> ...though it's not in Java yet."Let's hope it ..."-> ...though it's not in Java yet."<BR/><BR/>Let's hope it never gets into Java syntax...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-28228406.post-1148824707917694452006-05-28T09:58:00.000-04:002006-05-28T09:58:00.000-04:00Because it's a reserved token and Java doesn't req...Because it's a reserved token and Java doesn't require whitespace in unary and binary operations?Anonymousnoreply@blogger.com