I have a string value but i want to add "[^a-zA-Z0-9 ]%" with the string after the first word.
for ex: string S1='sustainability energy long last'
I want to add like : sustainability[^a-zA-Z0-9 ]% energy long last
How to do it.
I have a string value but i want to add "[^a-zA-Z0-9 ]%" with the string after the first word.
for ex: string S1='sustainability energy long last'
I want to add like : sustainability[^a-zA-Z0-9 ]% energy long last
How to do it.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naveen KumarPosted Oct 9, 2024, 12:54 PM
In VB.NET, you can concatenate or insert a string at a specific position by using the Insert method. Since you want to insert the substring [^a-zA-Z0-9 ]% after the first word, you can find the position of the first space and insert the string at that location.
But do you really want to insert a REGEX "[^a-zA-Z0-9 ]%"?
Check the below code:
PinkuPosted Oct 9, 2024, 1:15 PM
Thank you so much Navin. ACtuaaly i need this. I was trying something. SO thank you once again.