“RAQIB-4_زين”
You can just use lefr right function just pass the index that you want to get @mohammed_zain
see this link for your reference.
cheers
Happy learning
Name which is in English and Arabic and Number also.
Thanks,
Mohammed Zain
Is there any specific separator between them?
No just remove “- and _” . Read Separately.
Thanks,
So first use
Variable.split("-“c)(0)-----> Output RAQIB
Then Variable.Split(”_"c)(1)----> output زين
for middle
Variable.Split({“-”},StringSplitOption.None)(1).Trim.split({“_”},StringSplitOption.None)(0).trim-------------------> Output 4
Thanks Bro,
What is the use of c ("-"c). In this
Thanks once again.
we split by using Character “-” and c here means Character
what scope should i have to put in variable for this.
Thanks
Variable.Split({“-”},StringSplitOption.None)(1).Trim.split({“_”},StringSplitOption.None)(0).trim.
For this
Thanks
Hi @mohammed_zain,
Use can achieve that by using substring, check below
var = “RAQIB-4_زين”
var.Substring(0,var.IndexOf(“-”)).ToString - RAQIB
var.Substring(var.IndexOf(“-”)+1,var.IndexOf(““)-1-var.IndexOf(”-“)).ToString - 4
var.Substring(var.IndexOf(””)+1, (var.Length-1)-var.IndexOf(“_”)).ToString - زين
It is throwing an exception as var is not declared.
Thanks
You have to create a variable as var and assign your string to that var then try it
ok bro i will try.
Thanks
Variable will contains your string
“String split option is not declared. It may be inaccessible due to its protection level”. Throwing as exception.
Thanks,
Mohammed Zain
Send me that screenshot
Of Your variable and assign