Click here to Skip to main content

Regular Expressions

 
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 

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.1411023.1 | Last Updated 13 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid