Click here to Skip to main content
15,867,453 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
GeneralRe: Help with regex HTML form validation Pin
Richard Deeming10-Oct-14 7:47
mveRichard Deeming10-Oct-14 7:47 
QuestionRegular expression date Pin
Member 836446830-May-14 7:27
Member 836446830-May-14 7:27 
QuestionRe: Regular expression date Pin
George Jonsson13-Sep-14 23:21
professionalGeorge Jonsson13-Sep-14 23:21 
AnswerRe: Regular expression date Pin
nagshead_obx9-Oct-14 7:10
nagshead_obx9-Oct-14 7:10 
QuestionRe: Regular expression date Pin
George Jonsson9-Oct-14 16:18
professionalGeorge Jonsson9-Oct-14 16:18 
QuestionRegex to extact lines of code know the start and ending Pin
susanab17-Apr-14 3:25
susanab17-Apr-14 3:25 
QuestionRe: Regex to extact lines of code know the start and ending Pin
Matt T Heffron17-Apr-14 8:14
professionalMatt T Heffron17-Apr-14 8:14 
Question[Solved] Pin
Marco Bertschi20-Mar-14 4:10
protectorMarco Bertschi20-Mar-14 4:10 
Me again. RegEx again.

Problem: I need to parse a string which consists out of Key-Value pairs.
Keys are separated from values by a "=". Values can contain a "=", but they must be escaped as "\=".
Example
Key1=Text And escaped\= More stuff\=is here Key2=Value number2

Of course the second key can contain an escaped \=, too. Long story short: Values can be a normal string (any character), except that the equal sign must be escaped.

So far I got (?<=\s|^)([\w ]+)=(\w \\=*)?(?=[ \w=]|[$]) , but it only keeps ordinary Key=value pairs, cutting of at whitespaces.

Edit: Thanks to Richard, who provided a perfectly suitable solution.
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.


modified 20-Mar-14 13:03pm.

GeneralRe: A little help needed... Pin
Marco Bertschi20-Mar-14 5:24
protectorMarco Bertschi20-Mar-14 5:24 
GeneralRe: A little help needed... Pin
Haloniels19977-Sep-14 11:36
Haloniels19977-Sep-14 11:36 
QuestionRe: A little help needed... Pin
Kornfeld Eliyahu Peter20-Mar-14 4:55
professionalKornfeld Eliyahu Peter20-Mar-14 4:55 
AnswerRe: A little help needed... Pin
Marco Bertschi20-Mar-14 5:21
protectorMarco Bertschi20-Mar-14 5:21 
GeneralRe: A little help needed... Pin
Kornfeld Eliyahu Peter20-Mar-14 5:37
professionalKornfeld Eliyahu Peter20-Mar-14 5:37 
GeneralRe: A little help needed... Pin
Marco Bertschi20-Mar-14 5:49
protectorMarco Bertschi20-Mar-14 5:49 
GeneralRe: A little help needed... Pin
Kornfeld Eliyahu Peter20-Mar-14 6:27
professionalKornfeld Eliyahu Peter20-Mar-14 6:27 
GeneralRe: A little help needed... Pin
Marco Bertschi20-Mar-14 10:17
protectorMarco Bertschi20-Mar-14 10:17 
GeneralRe: A little help needed... Pin
Kornfeld Eliyahu Peter20-Mar-14 10:58
professionalKornfeld Eliyahu Peter20-Mar-14 10:58 
GeneralRe: A little help needed... Pin
Marco Bertschi20-Mar-14 11:21
protectorMarco Bertschi20-Mar-14 11:21 
GeneralRe: A little help needed... Pin
Kornfeld Eliyahu Peter20-Mar-14 11:28
professionalKornfeld Eliyahu Peter20-Mar-14 11:28 
GeneralRe: A little help needed... Pin
Marco Bertschi20-Mar-14 11:59
protectorMarco Bertschi20-Mar-14 11:59 
GeneralRe: A little help needed... Pin
Kornfeld Eliyahu Peter20-Mar-14 12:08
professionalKornfeld Eliyahu Peter20-Mar-14 12:08 
GeneralRe: A little help needed... Pin
Marco Bertschi20-Mar-14 12:14
protectorMarco Bertschi20-Mar-14 12:14 
JokeRe: A little help needed... Pin
Kornfeld Eliyahu Peter20-Mar-14 12:17
professionalKornfeld Eliyahu Peter20-Mar-14 12:17 
GeneralRe: A little help needed... Pin
Marco Bertschi20-Mar-14 20:23
protectorMarco Bertschi20-Mar-14 20:23 
GeneralRe: A little help needed... Pin
Kornfeld Eliyahu Peter20-Mar-14 22:42
professionalKornfeld Eliyahu Peter20-Mar-14 22:42 

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.