65
Views
5
Comments
Video URL Validation Regex.

Hello guys,
I need to validate the video URL when we add the URL in the form I need to use regex for it how can I validate  (ex:- YouTube URL, SharePoint URL, etc ..)

Someone can help?

Thanks

2024-10-07 06-43-19
Aanchal Sharma

Hi @Deepak Tandle 

here is regex for Youtube URL

Regex:-

"^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube(-nocookie)?\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?$"

its work fine for me. 

2026-02-13 09-13-35
Deepak Tandle

Hello @aanchal sharma
 
     Thank you for the response, I have checked this, and it is working fine but I need to check SharePoint video URL. Do you have any suggestions for it? 

Thanks

2023-10-21 19-42-11
Tousif Khan
Champion

Hello

I guess the best way for you is to write your custom pattern and check each result case here:
https://regexr.com/
What else you can do is search for patterns on forums there are 100 of results you will find with pre-written patterns and make changes based on your requirements.

Once the test cases are passed apply the same to your Outsystems,
We have actions available for it, you can refer to a link shared by @Alexandre Yip  if you want to do it on a client-side only you can use JS or you can use a forge component JavaScriptUtils.

Thanks
Tousif Khan

2026-02-13 09-13-35
Deepak Tandle

Hello Tousif Khan 

 Thank you for the response. I will try it.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.