1

私は文字列を持っています:

http://example.com/a b.html https://example.net/a+b+c http://example.org/one two three

それぞれのリンクは http または https で
始まり、それぞれの末尾にスペースなどの文字が含まれており、別のリンクの始まりです。どうすれば入手することができますか

http://example.com/a b.html
https://example.net/a+b+c
http://example.org/one two three.html

正規表現を使用していますか?

4

1 に答える 1

2

この正規表現は、必要なものを見つける必要があります。

https?.+?(?=http|$)
于 2012-07-18T20:24:49.627 に答える