Only match specific domains

ساخت وبلاگ

Vote count: 0

I got the following string:

<a href="/web/20120412083942/http://test.com/contact">Contact Us</a> | <a href="/web/20120412083942/https://test.com/privacy-policy">Privacy Policy</a> <br /><br />
<a href="/web/20120412083942/http://www.cassandracastanedaphoto.com/index2.php#/home/">Photography by Cassandra Castenada</a></span><!-- Start Shareaholic TopSharingBar Automatic --><!-- End Shareaholic TopSharingBar Automatic --><script src="/web/20120412083942js_/http://www.test.com/wp-content/plugins/tweetmeme/button.js" type="text/javascript"></script>
<!-- tracker added by Ultimate Google Analytics plugin v1.6.0: /web/20120412083942/http://www.oratransplant.nl/uga -->

I wanna match:

/web/20120412083942/http://test.com

/web/20120412083942/https://test.com

/web/20120412083942js_/http://www.test.com

Basically any url that has the web/[digit][potential string]/http://test.com

Here's my regex so far:

((http(s)?://)?web.archive.org)?/web/d+.*?/http(s)?://(www.)?test.com

The issue is, it matches the entire section:

/web/20120412083942/http://www.cassandracastanedaphoto.com/index2.php#/home/">Photography by Cassandra Castenadahttp://test.com

How can I make it so it stops looking after the domain didn't start with test.com?

asked 12 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : regex match only specific characters, نویسنده : استخدام کار backsoft بازدید : 1311 تاريخ : چهارشنبه 21 مهر 1395 ساعت: 8:50