I have a string which can include any special characters or numbers and mostly alphabets. But it contains a random date at the end. Please provide me regex expression to remove that date.
examples : samplestring04/05/2023, Sample2String09/08/2023, s@mplestring 09/08/2023
output : samplestring , Sample2String , s@mplestring
Tanmay_V_Chetule:
s@mplestring 09/08/2023
@Tanmay_V_Chetule
system.text.RegularExpressions.Regex.Replace(outputstr,"\d{2}/\d{2}/\d{4}","")
try this
HI @Tanmay_V_Chetule
Checkout this expression
System.text.RegularExpressions.Regex.Replace("INputString","\d{2}.\d{2}.\d{4}","")
Regards
Sudharsan
Parvathy
(PS Parvathy)
December 12, 2023, 1:32pm
4
Hi @Tanmay_V_Chetule
Try this:
Input= "samplestring04/05/2023"
Output= System.Text.RegularExprrssions.Regex.Replace(Input,"\d+\/\d+\/\d+","")
Hope it helps
system
(system)
Closed
December 15, 2023, 1:32pm
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.