hyphen in regular expression (cSharp)



Input
a-

Patterns

\w*-*
\w*(-*)
\w*(-)*
\w*[-]*

No of the patterns results in a match. Tried escaps(\) before hyphen
still no match.

My requirement is to make sure a string contains only digits, alphabets
and hypen (each 0 or more times).

.



Relevant Pages

  • Re: determinism, freewill, chaos, and circular causality
    ... Pi is expanded to zillions of digits by a fairly simple ... a million digits to a truly random string of a million digits and then ... There are intelligent patterns which are not distinguishable from ... can a computer intelligence surpass a human intelligence and how ...
    (comp.ai.philosophy)
  • Re: determinism, freewill, chaos, and circular causality
    ... Pi is expanded to zillions of digits by a fairly simple ... a million digits to a truly random string of a million digits and then ... There are intelligent patterns which are not distinguishable from ... Even if the brain is currently selecting "random behavior" (which I don't ...
    (comp.ai.philosophy)
  • Re: determinism, freewill, chaos, and circular causality
    ... Pi is expanded to zillions of digits by a fairly simple ... a million digits to a truly random string of a million digits and then ... There are intelligent patterns which are not distinguishable from ... Even if the brain is currently selecting "random behavior" (which I don't ...
    (comp.ai.philosophy)
  • Re: hyphen in regular expression (cSharp)
    ... characters, or hyphens. ... No of the patterns results in a match. ... My requirement is to make sure a string contains only digits, alphabets ...
    (microsoft.public.dotnet.languages.csharp)
  • identification of patterns in a long string
    ... I have string of 3 alphabets, namely p, q, and r. ... I would like to find the number of all patterns of letters upto half ...
    (comp.soft-sys.matlab)

Loading