03-09-2011, 12:01 PM
Depends on where you want to use. In the above scenario replace is cumbersome because you want to replace multiple values. while split would simply tear the rest and give you what you need at one shot.Moreover, when you split you can reuse the other part( which would be in the array) while replace, just replaces the data.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.