Gaurav07
(Gaurav Bahuguna)
November 2, 2019, 4:53am
1
input lines are
LAYCAN - 09/24/2019 – 09/26/2019 output - 09/24/2019 and 09/26/2019
09/24/2019 – 09/26/2019 output - Nothing
LAYCAN - 09/24/2019 output - 09/24/2019
Help me what the regex code should be which will extract dates from only that line which has LAYCAN
Out of these line I only want those dates which have word LAYCAN in the same line
monika.c
(Monika Chaudhari)
November 2, 2019, 4:58am
2
@Gaurav07
try this regular expression.
(?<=LAYCAN - ).+
StringVar=LAYCAN - 09/24/2019 – 09/26/2019
OutString=System.Text.RegularExpressions.Regex.Match(StringVar,“(?<=LAYCAN - ).+”).Value
Gaurav07
(Gaurav Bahuguna)
November 2, 2019, 6:08am
3
tx . can you plz tell code for following
input string -
200,000 MT Arabian Extra Light
I need to extract the number before MT in a variable
and whatever is after MT in a different cariable
lakshman
(Ganta lakshman)
November 2, 2019, 6:21am
4
@Gaurav07
Try this.
Str = "200,000 MT Arabian Extra Light"
Str1 = Str.Split(" "c)(0)
Str2 = Str.Split("MT".ToCharArray)(1)
Gaurav07
(Gaurav Bahuguna)
November 2, 2019, 6:52am
5
Hi
I want to use regex for this
input string -
Ras Tanura to Singapore = $11.91
I need to extract the number which has $ with it, in this example its 11.91, its not fixed that it will occur in the end, the only thing known is the number to be extracted has $ with it
use regex groups.Regex2.xaml (5.1 KB)