Hi all could you please give the solution for checking the string is starts with numeric and ends with alphabets like
string=70.00 Lakshs or 10.00 Rupees or 0.9 REPEES the sting has any kind of alphabets like case sensitive or else upper case anything how can i check it
Yoichi
(Yoichi)
February 14, 2023, 4:17am
2
HI,
How about the following expression?
System.Text.RegularExpressions.Regex.IsMatch(yourString,"^[-+]?\d[\d.,]*\b.*[A-Za-z]$")
Regards,
then how can i check the string starts with numeric and ends with numeric? @Yoichi kindly help me on this
Hey
give a try with
Regex.IsMatch(yourString, "^\d.*\d$")
Regards!
Yoichi
(Yoichi)
February 14, 2023, 4:22am
5
HI,
Do you mean numeric character or numeric value? (For example the former is “1ABC2”, the latter is “2 ABC 1”)
If the former, the following will work.
System.Text.RegularExpressions.Regex.IsMatch(yourString,"^\d.*\d$")
Regards,
2 Likes
like 0.90 or 70.00 or 70,000.00 or 10.00 like this
Yoichi
(Yoichi)
February 14, 2023, 4:29am
7
Hi,
Do we need to consider minus sign?
If not, the above will work.
If yes, the following might be better.
System.Text.RegularExpressions.Regex.IsMatch(yourString,"^[-+]?\d.*\d$")
Regards,
then how to check the string starts with alphabets and ends with alphabets @Yoichi kindly help me on this.
Yoichi
(Yoichi)
February 14, 2023, 4:59am
9
HI,
then how to check the string starts with alphabets and ends with alphabets
The following will work.
System.Text.RegularExpressions.Regex.IsMatch(yourString,"^[A-Za-z].*[A-Za-z]$")
Regards,
1 Like
how to check the string starts with alphabets and ends with numeric like @Yoichi kindly help me on this
Yoichi
(Yoichi)
February 14, 2023, 5:32am
11
Give it a try.
System.Text.RegularExpressions.Regex.IsMatch(yourString,"^[A-Za-z].*\d$")
Hi @Yoichi i need the string the text before the "
Yoichi
(Yoichi)
February 14, 2023, 7:35am
13
HI,
Can you try the following expression?
System.Text.RegularExpressions.Regex.Match(yourString,"ICIC\d+").Value
System.Text.RegularExpressions.Regex.Match(yourString,"\S+?@\S+?\.com",System.Text.RegularExpressions.RegexOptions.IgnoreCase).Value
Regards,
hi @Yoichi i need the value which is in between "
Yoichi
(Yoichi)
February 14, 2023, 8:39am
15
The following returns string b/w Balance and Create. Can you try this?
System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Balance).*?(?=Create)").Value
but the thing is i want the string starts from numeric value it is like 0.00 or else 70.00 or else 60,0000.00 like that
Yoichi
(Yoichi)
February 14, 2023, 8:46am
17
How about the following?
System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Balance\D*)\d[.,\dA-Za-z]+(?=[^\dA-Za-z]*Create)").Value
Hi @Yoichi please compare the one which i am sending now and the earlier and give the expression for getting the string between “Balance” and the “Create” which is starting from the number and ends with alphabets or number and contains the the value is like “70.97 Lakhs” kindly help me on this
Yoichi
(Yoichi)
February 14, 2023, 9:29am
19
Can you try the following?
System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Balance\D*)\d.*?[\dA-Za-z](?=[^\dA-Za-z]*Create)").Value
Try with this one @chandolusathi.kumar
System.Text.RegularExpressions.Regex.Match(yourString,"(?m)(?<=Balance)(.*?)(?=Create)").Value
Regards
Sudharsan