从任意文本中提取图像URL

时间:2017-03-08 23:02:39

标签: php html regex

嘿,我需要从这段文字中提取第一张图片:

[size=5]test.[/size]
 
[size=5]first.[/size]
 
[img=http://i64.tinypic.com/n337ap.png]
 
[size=5]Added:[/size]
 
[img=http://i63.tinypic.com/2m578i1.png]
 
[img=http://i65.tinypic.com/ev7653.png]

示例我想提取:http://i64.tinypic.com/n337ap.png

1 个答案:

答案 0 :(得分:-1)

这是正确的正则表达式:

<form *ngIf="settingsForm" [formGroup]="settingsForm ">
  <input formControlName="name" />
</form>