Click here to Skip to main content

Regular Expressions

 
GeneralRe: Trying to match non-quoted sections PinmemberAndreas Gieriet11-Apr-12 22:52 
GeneralRe: Trying to match non-quoted sections PinmvpLuc Pattyn7-Apr-12 10:43 
GeneralRe: Trying to match non-quoted sections [modified] PinmemberAndreas Gieriet7-Apr-12 11:39 
QuestionSomething I just learned, with IP addresses PinmemberTimothy CIAN20-Jan-12 7:42 
AnswerRe: Something I just learned, with IP addresses PinmemberAndreas Gieriet7-Apr-12 14:10 
QuestionHow to regex this PinmemberJacek Gajek17-Jan-12 13:05 
AnswerRe: How to regex this PinmemberPeter_in_278017-Jan-12 13:37 
GeneralRe: How to regex this PinmemberJacek Gajek17-Jan-12 13:55 
AnswerRe: How to regex this PinmemberPeter_in_278018-Jan-12 18:41 
GeneralRe: How to regex this PinmemberJacek Gajek19-Jan-12 5:12 
GeneralRe: How to regex this PinmemberJacek Gajek19-Jan-12 5:52 
AnswerRe: How to regex this [modified] PinmemberAndreas Gieriet7-Apr-12 12:17 
GeneralRe: How to regex this PinmemberJacek Gajek7-Apr-12 14:11 
QuestionCan anybody explain how this Regex works. Pinmemberfiaolle15-Nov-11 3: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. PinmemberPIEBALDconsult15-Nov-11 6:04 
GeneralRe: Can anybody explain how this Regex works. Pinmemberfiaolle15-Nov-11 7:08 
GeneralRe: Can anybody explain how this Regex works. PinmemberPIEBALDconsult15-Nov-11 7:34 
GeneralRe: Can anybody explain how this Regex works. Pinmemberfiaolle15-Nov-11 7:45 
GeneralRe: Can anybody explain how this Regex works. PinmemberPIEBALDconsult15-Nov-11 14:46 
GeneralRe: Can anybody explain how this Regex works. PinmemberAndreas Gieriet8-Apr-12 2:02 
AnswerRe: Can anybody explain how this Regex works. [modified] PinmemberAndreas Gieriet7-Apr-12 13:06 
QuestionUrl rewriting rule PinmemberGaurav.goel20913-Sep-11 1:18 
AnswerRe: Url rewriting rule PinmemberShahriar Iqbal Chowdhury24-Sep-11 12:00 
AnswerRe: Url rewriting rule PinmvpAspDotNetDev24-Sep-11 12:37 
QuestionRegular expression to check special character Pinmembersri_34648-Sep-11 12:16 
AnswerRe: Regular expression to check special character PinmemberMizard X25-Sep-11 1:06 
QuestionHelp with pattern PinmemberPhrone7-Sep-11 21:25 
AnswerRe: Help with pattern Pinmvpthatraja28-Nov-11 20:10 
QuestionWhat is the Regular expression that detects a $ sign and digits in html code PinmemberMember 82168286-Sep-11 8:49 
AnswerRe: What is the Regular expression that detects a $ sign and digits in html code [modified] PinmemberTimothy CIAN6-Sep-11 11:54 
GeneralRe: What is the Regular expression that detects a $ sign and digits in html code PinmemberMember 82168287-Sep-11 6:20 
GeneralRe: What is the Regular expression that detects a $ sign and digits in html code PinmemberTimothy CIAN7-Sep-11 6:27 
GeneralRe: What is the Regular expression that detects a $ sign and digits in html code PinmemberMember 82168287-Sep-11 9:48 
GeneralRe: What is the Regular expression that detects a $ sign and digits in html code PinprotectorPete O'Hanlon7-Sep-11 6:38 
AnswerRe: What is the Regular expression that detects a $ sign and digits in html code Pinmemberjschell7-Sep-11 9:32 
QuestionRegular Expression PinmemberMorgSim11-Jul-11 23:07 
AnswerRe: Regular Expression PinmemberFiro Atrum Ventus11-Jul-11 23:31 
GeneralRe: Regular Expression PinmemberMorgSim12-Jul-11 0:09 
GeneralRe: Regular Expression PinmemberPIEBALDconsult17-Jul-11 6:55 
AnswerRe: Regular Expression [modified] PinmemberPIEBALDconsult17-Jul-11 8:02 
AnswerRe: Regular Expression PinmemberJimmyRopes13-Aug-11 12:57 
AnswerRe: Regular Expression [modified] PinmemberShahan Ayyub23-Aug-11 12:00 
QuestionValue between brackets with a sperator character [modified] Pinmembernbgangsta26-May-11 3:27 
AnswerRe: Value between brackets with a sperator character Pinmembernbgangsta26-May-11 4:28 
AnswerRe: Value between brackets with a sperator character PinmemberPeter_in_278026-May-11 15:13 
Questionarray of file extentions PinmemberAli Al Omairi(Abu AlHassan)22-May-11 21:43 
AnswerRe: array of file extentions PinmemberPeter_in_278022-May-11 22:13 
GeneralRe: array of file extentions PinmemberAli Al Omairi(Abu AlHassan)23-May-11 22:46 
GeneralRe: array of file extentions PinmemberAli Al Omairi(Abu AlHassan)3-Nov-11 0:20 
QuestionForming reguar expressions using a builder class? PinmemberNaerling8-Apr-11 3: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
Web03 | 2.8.150326.1 | Last Updated 2 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid