-4

var text = "aaaaaaaaaaaaaaaabhhs fagfgfgawugf wgfa fgiaghfua fw7giawgfiawgfyig fgfiagfgfygf gfisgfigig https://firebasestorage.googleapis.com/v0/b/sjeccert.appspot.com/o/CSE%2F2KiliaEh1sQfF3%2F1593242527462_67923.jpg?alt=media&token=0225d5a9-9f66-4d0e-bc30-9563bcb51d0a fagfgfgawugf wgfa fgiaghfua fw7giawgfiawgfyig";

from this I want to extract the link any idea on how to do it

1 Answers1

1

Without :

let text = "aaaaaaaaaaaaaaaabhhs fagfgfgawugf wgfa fgiaghfua fw7giawgfiawgfyig fgfiagfgfygf gfisgfigig https://firebasestorage.googleapis.com/v0/b/sjeccert.appspot.com/o/CSE%2F2KiliaEh1sQfF3%2F1593242527462_67923.jpg?alt=media&token=0225d5a9-9f66-4d0e-bc30-9563bcb51d0a fagfgfgawugf wgfa fgiaghfua fw7giawgfiawgfyig";
let url = text.split(' ').filter( word => word.startsWith('http'))[0];
console.log(url);
A.J. Uppal
  • 19,117
  • 6
  • 45
  • 76