Sunday 15 September 2013

java - First Time Using Regex -



java - First Time Using Regex -

so it's first time using regex , i'm stuck @ 1 issue.

here string:

<img src="//i.imgur.com/ptj4u.jpg" />

i'm trying utilize regex create extract image url.

this i'd output of string be:

i.imgur.com/ptj4u.jpg

so want extract url html code. regex pattern that?

(?<=<img\ssrc="\/\/)[^"]*

you can seek this.use search mathod. see demo.

http://regex101.com/r/wq1ow3/21

java html regex string

No comments:

Post a Comment