I have string with some links like below,
Some text will come here <a class="checkSomething" href="https://something.com" style="color: rgb(255, 255, 255); font-size: 17px;">Check Status</a>. Some text will come here <a href="#">Click</a> Some text will come here.
From the above string I want extract the href
value where class name is checkSomething
.
Basically I have to get the link alone, that is https://something.com
I tried the below regex
/<a class="checkSomething" href="([^"]*)">/
But it gives link with <a>
tag like below
<a class="checkSomething" href="https://something.com"
Can someone help me on this? Thanks in advance!