This rather muddled. You haven't really explained what the input is,
what the expected output is and exactly what that regular expression
is trying to match
"The lion is the largest African carnivore. It is a sandy to tawny
coloured cat with white under parts on which females often retain
rosettes and spots characteristic of younger animal.then the last one is
<a href="Tiger">test</a>
The keywords are : lion, animals, african, Tiger.
So my expected output are , when i am running the task , should be
linked the keywords with href. but except which is in href already.
Expected Output:
"The <a href="www.animal.com">lion</a> is the largest <a
href="www.animal.com">African</a> carnivore. It is a sandy to tawny
coloured cat with white under parts on which females often retain
rosettes and spots characteristic of younger <a
href="www.animal.com">animal</a>.then the last one is <a
href="Tiger">test</a>
But right now i am getting like:
"The <a href="www.animal.com">lion</a> is the largest <a
href="www.animal.com">African</a> carnivore. It is a sandy to tawny
coloured cat with white under parts on which females often retain
rosettes and spots characteristic of younger <a
href="www.animal.com">animal</a>.then the last one is <a href="<a
href="www.animal.com">Tiger</a>">test</a>
Note: See i am getting link twice , inside the href again and again.
"The <a href="www.animal.com">lion</a> is the largest <a
href="www.animal.com">African</a> carnivore. It is a sandy to tawny
coloured cat with white under parts on which females often retain
rosettes and spots characteristic of younger <a
href="www.animal.com">animal</a>.then the last one is <a href="<a
href="www.animal.com">Tiger</a>">test</a>
Note: See i am getting link twice , inside the href again and again.
it should not link , which is inside the href.
that makes sense, what doesn't make any sense is your regular
expression. What were you trying to make it do?