Click here to Skip to main content
12,689,349 members (29,837 online)

Regular Expressions

 
AnswerRe: How to regex this Pin
Peter_in_278017-Jan-12 13:37
memberPeter_in_278017-Jan-12 13:37 
GeneralRe: How to regex this Pin
Jacek Gajek17-Jan-12 13:55
memberJacek Gajek17-Jan-12 13:55 
AnswerRe: How to regex this Pin
Peter_in_278018-Jan-12 18:41
memberPeter_in_278018-Jan-12 18:41 
GeneralRe: How to regex this Pin
Jacek Gajek19-Jan-12 5:12
memberJacek Gajek19-Jan-12 5:12 
GeneralRe: How to regex this Pin
Jacek Gajek19-Jan-12 5:52
memberJacek Gajek19-Jan-12 5:52 
AnswerRe: How to regex this Pin
Andreas Gieriet7-Apr-12 12:17
memberAndreas Gieriet7-Apr-12 12:17 
GeneralRe: How to regex this Pin
Jacek Gajek7-Apr-12 14:11
memberJacek Gajek7-Apr-12 14:11 
QuestionCan anybody explain how this Regex works. Pin
fiaolle15-Nov-11 3:26
memberfiaolle15-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. Pin
PIEBALDconsult15-Nov-11 6:04
memberPIEBALDconsult15-Nov-11 6:04 
GeneralRe: Can anybody explain how this Regex works. Pin
fiaolle15-Nov-11 7:08
memberfiaolle15-Nov-11 7:08 
GeneralRe: Can anybody explain how this Regex works. Pin
PIEBALDconsult15-Nov-11 7:34
memberPIEBALDconsult15-Nov-11 7:34 
GeneralRe: Can anybody explain how this Regex works. Pin
fiaolle15-Nov-11 7:45
memberfiaolle15-Nov-11 7:45 
GeneralRe: Can anybody explain how this Regex works. Pin
PIEBALDconsult15-Nov-11 14:46
memberPIEBALDconsult15-Nov-11 14:46 
GeneralRe: Can anybody explain how this Regex works. Pin
Andreas Gieriet8-Apr-12 2:02
memberAndreas Gieriet8-Apr-12 2:02 
AnswerRe: Can anybody explain how this Regex works. Pin
Andreas Gieriet7-Apr-12 13:06
memberAndreas Gieriet7-Apr-12 13:06 
QuestionUrl rewriting rule Pin
Gaurav.goel20913-Sep-11 1:18
memberGaurav.goel20913-Sep-11 1:18 
AnswerRe: Url rewriting rule Pin
Shahriar Iqbal Chowdhury24-Sep-11 12:00
memberShahriar Iqbal Chowdhury24-Sep-11 12:00 
AnswerRe: Url rewriting rule Pin
AspDotNetDev24-Sep-11 12:37
mvpAspDotNetDev24-Sep-11 12:37 
QuestionRegular expression to check special character Pin
sri_34648-Sep-11 12:16
membersri_34648-Sep-11 12:16 
AnswerRe: Regular expression to check special character Pin
Mizard X25-Sep-11 1:06
memberMizard X25-Sep-11 1:06 
QuestionHelp with pattern Pin
Phrone7-Sep-11 21:25
memberPhrone7-Sep-11 21:25 
AnswerRe: Help with pattern Pin
thatraja28-Nov-11 20:10
mvpthatraja28-Nov-11 20:10 
QuestionWhat is the Regular expression that detects a $ sign and digits in html code Pin
Member 82168286-Sep-11 8:49
memberMember 82168286-Sep-11 8:49 
AnswerRe: What is the Regular expression that detects a $ sign and digits in html code [modified] Pin
Timothy CIAN6-Sep-11 11:54
memberTimothy CIAN6-Sep-11 11:54 
GeneralRe: What is the Regular expression that detects a $ sign and digits in html code Pin
Member 82168287-Sep-11 6:20
memberMember 82168287-Sep-11 6:20 

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.170113.4 | Last Updated 26 May 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid