Created
July 30, 2018 21:18
-
-
Save indatawetrust/d8292d2d4b6471e13d7e07e7a4308e2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
String str = "a:10:{i:1520;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9764.jpg\";i:1519;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9763.jpg\";i:1532;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9880.jpg\";i:1528;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9876.jpg\";i:1521;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9767.jpg\";i:1522;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9769.jpg\";i:1525;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9773.jpg\";i:1523;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9770.jpg\";i:1527;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9875.jpg\";i:1526;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9775.jpg\";}"; | |
RegExp exp = new RegExp(r"(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|gif|png)"); | |
Iterable<Match> matches = exp.allMatches(str); | |
matches.toList().forEach((item) { | |
print(item[0]); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment