I need to show some text using <h:outputText>
tag component. There is this requirement that if the text contains an URLs i.e. http//example.com.co
, I need show it as a link.
For example, if user enters Yo quiero www.google.com I need to show Yo quiero www.google.com
You need a function which does a regular expression replace on your string. You can use
string.replaceAll()
for this.You have multiple options to place this function.
No 1 is the easiest to implement imho.