InputString=“ABC
JANUARY 13,2023
DEF” i Need that JANUARY 13,2023 String Value. Suggest a method to get it
OutputString=System.Text.RegularExpressions.Regex.Match(InputString,"[A-Z]+\s+\d{2}\,\d{4}").Value
Instead ABC and DEF if any other comes means what is the expression
Regular expression checks the pattern if it matches the pattern then it will store that data,
For example:[A-Z]+\s+\d{2}\,\d{4}
In this it will check the word or one letter which contains space and then digits of length 2and then comma and then digit with length of 4 then only it stores the data.
Hope it gives some basic understanding
1 Like
Assign-> Input = "ABC
JANUARY 13,2023
DEF"
Assign-> Output = System.Text.RegularExpressions.Regex.Match(Input,"\w+.*\d+").Value.Trim()
Hope it helps!!
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.