Click here to Skip to main content
15,920,005 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionregular expression [modified] Pin
Sonia Gupta27-Dec-07 17:46
Sonia Gupta27-Dec-07 17:46 
GeneralRe: regular expression Pin
aswini27-Dec-07 19:19
aswini27-Dec-07 19:19 
GeneralRe: regular expression Pin
Sonia Gupta27-Dec-07 19:26
Sonia Gupta27-Dec-07 19:26 
GeneralRe: regular expression Pin
sulabh202027-Dec-07 19:39
sulabh202027-Dec-07 19:39 
GeneralRe: regular expression Pin
N a v a n e e t h27-Dec-07 19:48
N a v a n e e t h27-Dec-07 19:48 
GeneralRe: regular expression Pin
N a v a n e e t h27-Dec-07 19:45
N a v a n e e t h27-Dec-07 19:45 
GeneralRe: regular expression Pin
Sonia Gupta27-Dec-07 19:56
Sonia Gupta27-Dec-07 19:56 
GeneralRe: regular expression Pin
N a v a n e e t h27-Dec-07 20:24
N a v a n e e t h27-Dec-07 20:24 
Sonia Gupta wrote:
Navaneeth , i want the basic book for regular expressions.Can u please refer me any one


I don't know any good books for regular expression. You can try RegExBuddy. It's good program which helps to write regular expressions.

Sonia Gupta wrote:
If u can make me understand this term .


I will try. Following is the explanation for above regular expression. I will split the above expression into small expressions, that is easy to understand.

\b[\d]+$ : This matches any digit in between 0-9 unlimited times. So matches all 12 , 1234 , 12345 etc. This won't match 125s or s584. So real number part is done. Now we need expression for fractional numbers. Bear it in mind, fractional numbers could be written in two ways, 12.32 and .32. Below is the expression which matches fractional numbers.

\A([\d]+[\.]{1}[\d]+$|[\.]{1}[\d]+$) : This contains two nested expressions for two types of fractional numbers. First one is ([\d]+[\.]{1}[\d]+$ : which matches 0.25 , 12.25 etc. This fails to match .25 , 0..25.

[\.]{1}[\d]+$) this is the second nested expression which matches any number starts with . symbol (.123,.87). These two expressions are combined using or(|) operator. SO if first one fails, regex engine will look for a match with second one.

In the same way these two expressions are combined with the first expression using another or operator. So regex engine will look for a real number without any decimal points first. If that one fails, it will enter into the second expression. Second expression is nested, so it will look for match with the first regex, and when it fails it will move to second. If all these fails, entire expression will be failed.

\A Asserts position at the beginning
$ Asserts position at the end

Hope it helps




All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

My Website | Ask smart questions

GeneralRe: regular expression Pin
Sonia Gupta27-Dec-07 21:03
Sonia Gupta27-Dec-07 21:03 
GeneralRe: regular expression Pin
N a v a n e e t h27-Dec-07 21:11
N a v a n e e t h27-Dec-07 21:11 
QuestionHow to access cookies in a domain Pin
Reena.E27-Dec-07 17:32
Reena.E27-Dec-07 17:32 
AnswerRe: How to access cookies in a domain Pin
Michael Sync27-Dec-07 18:43
Michael Sync27-Dec-07 18:43 
General<b>encrypt webconfig value of appsetting in asp.net and Administrator also change the value Manualy</b> Pin
Piyush Vardhan Singh27-Dec-07 17:29
Piyush Vardhan Singh27-Dec-07 17:29 
QuestionDataGrid Pin
senthilsstil27-Dec-07 17:23
senthilsstil27-Dec-07 17:23 
GeneralRe: DataGrid Pin
Sun Rays27-Dec-07 19:41
Sun Rays27-Dec-07 19:41 
QuestionSending Email exception Pin
hurrem27-Dec-07 10:56
hurrem27-Dec-07 10:56 
GeneralRe: Sending Email exception Pin
Paul Conrad27-Dec-07 15:03
professionalPaul Conrad27-Dec-07 15:03 
GeneralRe: Sending Email exception Pin
hurrem27-Dec-07 15:07
hurrem27-Dec-07 15:07 
GeneralRe: Sending Email exception Pin
Paul Conrad27-Dec-07 18:04
professionalPaul Conrad27-Dec-07 18:04 
GeneralRe: Sending Email exception Pin
hurrem27-Dec-07 18:06
hurrem27-Dec-07 18:06 
QuestionReporting Services Multi-Valued Report Parameters Pin
gates0927-Dec-07 4:28
gates0927-Dec-07 4:28 
QuestionCan I use VB Methods I created in Reporting Services? Pin
gates0927-Dec-07 4:27
gates0927-Dec-07 4:27 
GeneralRe: Can I use VB Methods I created in Reporting Services? Pin
Michael Sync27-Dec-07 18:46
Michael Sync27-Dec-07 18:46 
GeneralRe: Can I use VB Methods I created in Reporting Services? Pin
gates0928-Dec-07 1:44
gates0928-Dec-07 1:44 
GeneralHttp Handler Pin
ss.mmm27-Dec-07 4:01
ss.mmm27-Dec-07 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.