Click here to Skip to main content
14,921,612 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
GeneralRe: Regex Expression to extract everything following a string and before a space Pin
Member 1457241529-Aug-19 10:05
MemberMember 1457241529-Aug-19 10:05 
GeneralRe: Regex Expression to extract everything following a string and before a space Pin
phil.o29-Aug-19 19:29
mvephil.o29-Aug-19 19:29 
GeneralRe: Regex Expression to extract everything following a string and before a space Pin
Richard Deeming30-Aug-19 3:05
mveRichard Deeming30-Aug-19 3:05 
QuestionMatching separate regions Pin
Member 1450443318-Jun-19 4:10
MemberMember 1450443318-Jun-19 4:10 
AnswerRe: Matching separate regions Pin
OriginalGriff18-Jun-19 4:12
mveOriginalGriff18-Jun-19 4:12 
GeneralRe: Matching separate regions Pin
Member 1450443318-Jun-19 5:40
MemberMember 1450443318-Jun-19 5:40 
GeneralRe: Matching separate regions Pin
OriginalGriff18-Jun-19 5:46
mveOriginalGriff18-Jun-19 5:46 
QuestionCannot extract end of line data Pin
mo14927-Jan-19 3:44
Membermo14927-Jan-19 3:44 
Hello, I am new to using Regex and hope someone can help with my expresion.
I am using VB.net Regex.Match() to extract info.

I cannot figure out how to include the text at the end of a line in my expression.
I'm using Expresso for testing my expression.

Expression without double quotes:
"(.*?)(\\~zs\\~ls)(.*?)(\\~le\\~ks)(.*?)(\\~ke\\~hs)(.*?)(\\~he\\~ze)(.*?)"

Source Data1:
test \~zs\~lsMt+22:21\~le\~ksMt+22:211\~ke\~hs\~he\~ze end of line

Returns:
[test \~zs\~lsMt+22:21\~le\~ksMt+22:211\~ke\~hs\~he\~ze]
1: [test ]
2: [\~zs\~ls]
3: [Mt+22:21]
4: [\~le\~ks]
5: [Mt+22:211]
6: [\~ke\~hs]
7: []
8: [\~he\~ze]
9: []

I do not get a reference to [end of line]


Source Data2:
\~zs\~lsMark+1:1\~le\~ksMark+1:11\~ke\~hs\~he\~ze some data \~zs\~lsMark+2:1\~le\~ksMark+2:11\~ke\~hs\~he\~ze end of line

Returns 2 matches:
Match1:
[\~zs\~lsMark+1:1\~le\~ksMark+1:11\~ke\~hs\~he\~ze]
1: []
2: [\~zs\~ls]
3: [Mark+1:1]
4: [\~le\~ks]
5: [Mark+1:11]
6: [\~ke\~hs]
7: []
8: [\~he\~ze]
9: []

Match2:
[ some data \~zs\~lsMark+2:1\~le\~ksMark+2:11\~ke\~hs\~he\~ze]
1: [ some data ]
2: [\~zs\~ls]
3: [Mark+2:1]
4: [\~le\~ks]
5: [Mark+2:11]
6: [\~ke\~hs]
7: []
8: [\~he\~ze]
9: []

Again, I do not get a reference to [end of line]

I've tried end the expression with this (.*$) which works for Source Data 1 but
Source data 2 just returns one match with 9:[ some data \~zs....]

Can someone help me with extracting the [end of line] text to item 9:?

thank you
AnswerRe: Cannot extract end of line data Pin
jsc4211-Apr-20 8:48
professionaljsc4211-Apr-20 8:48 
QuestionRegex code to check textfield is working until a 'enter' is given Pin
Member 1255403315-Mar-18 6:10
MemberMember 1255403315-Mar-18 6:10 
AnswerRe: Regex code to check textfield is working until a 'enter' is given Pin
Gerry Schmitz15-Mar-18 6:27
mveGerry Schmitz15-Mar-18 6:27 
QuestionRe: Regex code to check textfield is working until a 'enter' is given Pin
Super Superman15-Mar-18 6:42
MemberSuper Superman15-Mar-18 6:42 
AnswerRe: Regex code to check textfield is working until a 'enter' is given Pin
Member 1255403315-Mar-18 6:53
MemberMember 1255403315-Mar-18 6:53 
GeneralRe: Regex code to check textfield is working until a 'enter' is given Pin
Super Superman16-Mar-18 3:07
MemberSuper Superman16-Mar-18 3:07 
GeneralRe: Regex code to check textfield is working until a 'enter' is given Pin
Member 1255403316-Mar-18 4:51
MemberMember 1255403316-Mar-18 4:51 
Questionregular expression to find tax file numbers Pin
Copalol3-Dec-17 19:08
MemberCopalol3-Dec-17 19:08 
AnswerRe: regular expression to find tax file numbers Pin
Peter_in_27803-Dec-17 19:48
professionalPeter_in_27803-Dec-17 19:48 
GeneralRe: regular expression to find tax file numbers Pin
jschell5-Dec-17 12:06
Memberjschell5-Dec-17 12:06 
AnswerRe: regular expression to find tax file numbers Pin
George Jonsson4-Dec-17 23:25
professionalGeorge Jonsson4-Dec-17 23:25 
GeneralRe: regular expression to find tax file numbers Pin
Copalol5-Dec-17 13:05
MemberCopalol5-Dec-17 13:05 
GeneralRe: regular expression to find tax file numbers Pin
jschell8-Dec-17 6:51
Memberjschell8-Dec-17 6:51 
AnswerRe: regular expression to find tax file numbers Pin
jschell5-Dec-17 12:22
Memberjschell5-Dec-17 12:22 
GeneralRe: regular expression to find tax file numbers Pin
Copalol5-Dec-17 13:32
MemberCopalol5-Dec-17 13:32 
QuestionCorrect Expression For 'Any Character Including Whitespace' Pin
Sonhospa7-May-17 9:23
MemberSonhospa7-May-17 9:23 
SuggestionRe: Correct Expression For 'Any Character Including Whitespace' Pin
Richard MacCutchan7-May-17 21:22
mveRichard MacCutchan7-May-17 21:22 

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.