Click here to Skip to main content
11,583,484 members (65,203 online)

Regular Expressions

 
GeneralRe: Trying to match non-quoted sections Pin
Andreas Gieriet11-Apr-12 21:52
memberAndreas Gieriet11-Apr-12 21:52 
GeneralRe: Trying to match non-quoted sections Pin
Luc Pattyn7-Apr-12 9:43
mvpLuc Pattyn7-Apr-12 9:43 
GeneralRe: Trying to match non-quoted sections Pin
Andreas Gieriet7-Apr-12 10:39
memberAndreas Gieriet7-Apr-12 10:39 
QuestionSomething I just learned, with IP addresses Pin
Timothy CIAN20-Jan-12 6:42
memberTimothy CIAN20-Jan-12 6:42 
AnswerRe: Something I just learned, with IP addresses Pin
Andreas Gieriet7-Apr-12 13:10
memberAndreas Gieriet7-Apr-12 13:10 
QuestionHow to regex this Pin
Jacek Gajek17-Jan-12 12:05
memberJacek Gajek17-Jan-12 12:05 
AnswerRe: How to regex this Pin
Peter_in_278017-Jan-12 12:37
memberPeter_in_278017-Jan-12 12:37 
GeneralRe: How to regex this Pin
Jacek Gajek17-Jan-12 12:55
memberJacek Gajek17-Jan-12 12:55 
AnswerRe: How to regex this Pin
Peter_in_278018-Jan-12 17:41
memberPeter_in_278018-Jan-12 17:41 
GeneralRe: How to regex this Pin
Jacek Gajek19-Jan-12 4:12
memberJacek Gajek19-Jan-12 4:12 
GeneralRe: How to regex this Pin
Jacek Gajek19-Jan-12 4:52
memberJacek Gajek19-Jan-12 4:52 
AnswerRe: How to regex this Pin
Andreas Gieriet7-Apr-12 11:17
memberAndreas Gieriet7-Apr-12 11:17 
GeneralRe: How to regex this Pin
Jacek Gajek7-Apr-12 13:11
memberJacek Gajek7-Apr-12 13:11 
QuestionCan anybody explain how this Regex works. Pin
fiaolle15-Nov-11 2:26
memberfiaolle15-Nov-11 2:26 
Hi
I'm using C# and I have the regex below to split words and not split a string ".. .." instead take the whole string as on item to a List.

Example:
text="all "1 dl""
after split
all[0]="all"
all[1]="1 dl"

I found it in Google and it works, but I don't understand how it works.

string regexSpliter = @"(?<=^(?:[^""]*""[^""]*"")*[^""]*) ";
List<string> all =new List<string>_ (System.Text.RegularExpressions.Regex.Split(text, regexSpliter));

And if I remove the space before the last " in the string it doesn't work as I want. It seems like it splits all the characters in to elements written in the string text.

Can anybody please explain the string regexSplitter and why it has to be a space last in the string.

Many thanks
Fia
AnswerRe: Can anybody explain how this Regex works. Pin
PIEBALDconsult15-Nov-11 5:04
memberPIEBALDconsult15-Nov-11 5:04 
GeneralRe: Can anybody explain how this Regex works. Pin
fiaolle15-Nov-11 6:08
memberfiaolle15-Nov-11 6:08 
GeneralRe: Can anybody explain how this Regex works. Pin
PIEBALDconsult15-Nov-11 6:34
memberPIEBALDconsult15-Nov-11 6:34 
GeneralRe: Can anybody explain how this Regex works. Pin
fiaolle15-Nov-11 6:45
memberfiaolle15-Nov-11 6:45 
GeneralRe: Can anybody explain how this Regex works. Pin
PIEBALDconsult15-Nov-11 13:46
memberPIEBALDconsult15-Nov-11 13:46 
GeneralRe: Can anybody explain how this Regex works. Pin
Andreas Gieriet8-Apr-12 1:02
memberAndreas Gieriet8-Apr-12 1:02 
AnswerRe: Can anybody explain how this Regex works. Pin
Andreas Gieriet7-Apr-12 12:06
memberAndreas Gieriet7-Apr-12 12:06 
QuestionUrl rewriting rule Pin
Gaurav.goel20913-Sep-11 0:18
memberGaurav.goel20913-Sep-11 0:18 
AnswerRe: Url rewriting rule Pin
Shahriar Iqbal Chowdhury24-Sep-11 11:00
memberShahriar Iqbal Chowdhury24-Sep-11 11:00 
AnswerRe: Url rewriting rule Pin
AspDotNetDev24-Sep-11 11:37
mvpAspDotNetDev24-Sep-11 11:37 
QuestionRegular expression to check special character Pin
sri_34648-Sep-11 11:16
membersri_34648-Sep-11 11:16 
AnswerRe: Regular expression to check special character Pin
Mizard X25-Sep-11 0:06
memberMizard X25-Sep-11 0:06 
QuestionHelp with pattern Pin
Phrone7-Sep-11 20:25
memberPhrone7-Sep-11 20:25 
AnswerRe: Help with pattern Pin
thatraja28-Nov-11 19:10
mvpthatraja28-Nov-11 19:10 
QuestionWhat is the Regular expression that detects a $ sign and digits in html code Pin
Member 82168286-Sep-11 7:49
memberMember 82168286-Sep-11 7:49 
AnswerRe: What is the Regular expression that detects a $ sign and digits in html code [modified] Pin
Timothy CIAN6-Sep-11 10:54
memberTimothy CIAN6-Sep-11 10:54 
GeneralRe: What is the Regular expression that detects a $ sign and digits in html code Pin
Member 82168287-Sep-11 5:20
memberMember 82168287-Sep-11 5:20 
GeneralRe: What is the Regular expression that detects a $ sign and digits in html code Pin
Timothy CIAN7-Sep-11 5:27
memberTimothy CIAN7-Sep-11 5:27 
GeneralRe: What is the Regular expression that detects a $ sign and digits in html code Pin
Member 82168287-Sep-11 8:48
memberMember 82168287-Sep-11 8:48 
GeneralRe: What is the Regular expression that detects a $ sign and digits in html code Pin
Pete O'Hanlon7-Sep-11 5:38
protectorPete O'Hanlon7-Sep-11 5:38 
AnswerRe: What is the Regular expression that detects a $ sign and digits in html code Pin
jschell7-Sep-11 8:32
memberjschell7-Sep-11 8:32 
QuestionRegular Expression Pin
MorgSim11-Jul-11 22:07
memberMorgSim11-Jul-11 22:07 
AnswerRe: Regular Expression Pin
Firo Atrum Ventus11-Jul-11 22:31
memberFiro Atrum Ventus11-Jul-11 22:31 
GeneralRe: Regular Expression Pin
MorgSim11-Jul-11 23:09
memberMorgSim11-Jul-11 23:09 
GeneralRe: Regular Expression Pin
PIEBALDconsult17-Jul-11 5:55
memberPIEBALDconsult17-Jul-11 5:55 
AnswerRe: Regular Expression [modified] Pin
PIEBALDconsult17-Jul-11 7:02
memberPIEBALDconsult17-Jul-11 7:02 
AnswerRe: Regular Expression Pin
JimmyRopes13-Aug-11 11:57
memberJimmyRopes13-Aug-11 11:57 
AnswerRe: Regular Expression [modified] Pin
Shahan Ayyub23-Aug-11 11:00
memberShahan Ayyub23-Aug-11 11:00 
QuestionValue between brackets with a sperator character [modified] Pin
nbgangsta26-May-11 2:27
membernbgangsta26-May-11 2:27 
AnswerRe: Value between brackets with a sperator character Pin
nbgangsta26-May-11 3:28
membernbgangsta26-May-11 3:28 
AnswerRe: Value between brackets with a sperator character Pin
Peter_in_278026-May-11 14:13
memberPeter_in_278026-May-11 14:13 
Questionarray of file extentions Pin
Ali Al Omairi(Abu AlHassan)22-May-11 20:43
memberAli Al Omairi(Abu AlHassan)22-May-11 20:43 
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 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web04 | 2.8.150603.1 | Last Updated 2 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid