extractUrl ดึงที่อยู่ URL จากข้อความหรือข้อมูล ฟังก์ชันนี้มีประโยชน์ในการสกัด URLs จากข้อความยาว ความเห็น หรือ log files
=extractUrl(text)
=extractUrl(text)
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
| text | string | Yes | ข้อความที่มี URL อยู่ข่างใน |
ดึง URLs จากความเห็นหรือข้อความยาว
ดึก URLs ที่มีปัญหาจาก error logs
{{ extractUrl('Check this out: https://www.example.com/page for more info') }}={{ extractUrl('Check this out: https://www.example.com/page for more info') }}
https://www.example.com/page
{{ extractUrl($json.description) }}={{ extractUrl($json.description) }}
https://example.com/resource
{{ extractUrl('Visit example.com today') }}={{ extractUrl('Visit example.com today') }}
example.com
ฟังก์ชันแบบมาตรฐานจะดึก URL ตัวแรก หากต้องการทั้งหมด ให้ใช้ regex หรือ split method
ได้ ฟังก์ชันจะพยายามค้นหา URLs แม้ไม่มี http:// หรือ https://
ใช้เมื่อต้องดึก URLs จากข้อความ เช่นจากความเห็น, ข้อความ, หรือ log files
extractUrl เป็นฟังก์ชันที่ดึง URL จากข้อความ ใช้เมื่อมีข้อมูลที่มี URL อยู่ในส่วนของข้อความและต้องการแยกมันออก