Regular Expression Pattern for C# with matches
Posted
by
Sumit Gupta
on Stack Overflow
See other posts from Stack Overflow
or by Sumit Gupta
Published on 2012-05-31T10:37:37Z
Indexed on
2012/05/31
10:40 UTC
Read the original article
Hit count: 224
I am working on project where I need to find Frequency from a given text. I wrote a Regular expression that try to detect frequency, however I am stuck with how C# handle it and how exactly I use it in my software
My regular experssion is (\d*)(([,\.]?\s*((k|m)?hz)*)|(\s*((k|m)?hz)*))$
And I am trying to find value from
- 23,2 Hz
- 24,4Hz
- 25,0 Hzsadf
- 26 Hz
- 27Khz
- 28hzzhzhzhdhdwe
- 29
- 30.4Hz
- 31.8 Hz
- 4343.34.234 Khz
- 65SD
Further Explanation:
- System needs to work for US and Belgium Culture hence, 23.2 (US) = 23,2 (Be)
- I try to find a Digit, followed by either khz,mhz,hz or space or , or .
- If it is , or . then it should have another Digit followed by khz, mhz, hz
Any help is appericated.
© Stack Overflow or respective owner