I want to find First Word matching from Given Text and replace with another word, using Regex.
Consider following string as an Example Text
Which type is your item? i suppose that the item isn't a string, if so you can override ToString() method in the item class and use the jayant's code.
I want to search first "item" word in it and replace that with text "hello". Remember i just want to replace first "item" word only and not all.
So output of above text would be something like following.
Which type is your hello? i suppose that the item isn't a string, if so you can override ToString() method in the item class and use the jayant's code.
I am using C# Programming to do this and I would prefer to use Regex if possible.
Can anyone please help me with this.