Click here to Skip to main content
13,043,092 members (58,806 online)

Regular Expressions

 
AnswerRe: array of file extentions Pin
Peter_in_278022-May-11 21:13
memberPeter_in_278022-May-11 21:13 
GeneralRe: array of file extentions Pin
Ali Al Omairi(Abu AlHassan)23-May-11 21:46
memberAli Al Omairi(Abu AlHassan)23-May-11 21:46 
GeneralRe: array of file extentions Pin
Ali Al Omairi(Abu AlHassan)2-Nov-11 23:20
memberAli Al Omairi(Abu AlHassan)2-Nov-11 23:20 
QuestionForming reguar expressions using a builder class? Pin
Naerling8-Apr-11 2:13
memberNaerling8-Apr-11 2:13 
I just started reading about regular expressions and they seem quite complex. So I am going to try really hard to understand them. But I am worried that if I ever want to use regular expressions at work I need to present a format that everyone could understand. So I was thinking something like:
Dim regEx As New RegExBuilder
 
' The entire code is pretty much self describing I think.
' Text must match from the start
' The text must start with plain text, that must be followed by a @, which must be followed by
' another sequence of text, which must be followed by a . and a 2 or 3 character domain (example: .nl or .com)
' This must be the entire text.
regEx.MatchStart.SequenceOfText.MatchChar("@").SequenceOfText.MatchChar(".").SequenceOfText(2, 3).MatchEnd
 
If Not Regex.IsMatch(TextBox1.Text, regEx.GetExpression) Then
   MessageBox.Show("This is not a valid email address")
End If

Does that exist or am I saying something really stupid? Laugh | :laugh:
I was thinking of making something like that myself, just for fun and to get to know regular expressions myself.
If I succeed and people are interested I could probably put it in an article here on CP too Smile | :)
It's an OO world.

AnswerRe: Forming reguar expressions using a builder class? Pin
Richard A. Abbott8-Apr-11 2:40
memberRichard A. Abbott8-Apr-11 2:40 
GeneralRe: Forming reguar expressions using a builder class? Pin
Naerling8-Apr-11 8:54
memberNaerling8-Apr-11 8:54 
AnswerRe: Forming reguar expressions using a builder class? Pin
PIEBALDconsult22-May-11 3:27
memberPIEBALDconsult22-May-11 3:27 
QuestionNegative regular expression Pin
Łukasz Nowakowski4-Apr-11 22:11
memberŁukasz Nowakowski4-Apr-11 22:11 
AnswerRe: Negative regular expression Pin
Peter_in_27804-Apr-11 23:42
memberPeter_in_27804-Apr-11 23:42 
GeneralRe: Negative regular expression Pin
Łukasz Nowakowski5-Apr-11 0:09
memberŁukasz Nowakowski5-Apr-11 0:09 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 8 May 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid