How to use replace operation in String Function Using XPath in Xml

In this article I will explain replace operation of string function.
  • 2344

Introduction

The replace operation of string can be used to replace the character in the string with the given character. This function takes the three arguments the first is the string ,the second is the pattern that we want to replace and the third argument is the replace character that we changed with the second argument in the string.

Syntax

 replace (string, pattern, replace)

Example

replace ("hello how are you" , "h" ,"*")
replace ("Hello how are you" , "l" , "L")
replace ("hello how are you" , "h" ,"")

Output

*ello *ow are you
HeLLo how are you
ello ow are you

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.