https://ddd.comhttps://xxx.comhttps://bbb.com
I want to match the first https://ddd.com, how should I write it? The URL name is random I wrote it myself /https:\/\/\w (?:\. com)/, but all URLs are matched, I only need the first
/https:\/\/\w (?:\. com)/
What you need is lazy matching pattern
/https:\/\/\w+?(?:\.com)/
What you need is lazy matching pattern