[Skip to main content](#vessel-content)

#   Useful REGEX for Hikashop ( regular expression )

##

- **[oxido](/forum/user/29793-oxido "View oxido's Profile")**
- [![oxido's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29793-oxido "View oxido's Profile") Topic Author
- [ Offline](/forum/user/29793-oxido)

Less More

- Posts: 282
- Thank you received: 42
-
-

8 years 7 months ago -  8 years 2 weeks ago [\#290310](#290310) by [oxido](/forum/user/29793-oxido "View oxido's Profile")  *[Useful REGEX for Hikashop ( regular expression )](/forum/2-general-talk-about-hikashop/894249-useful-regex-for-hikashop-regular-expression#290310 "I needed to use regex on my site on a custom text field and I think it's good that this regex created by me will not be lost, so I decided to post it here, and maybe other people will post they regex code they used and how.  So, in Hikashop i went to: Hikashop &gt; Display &gt; Custom Fields I created a new field type: Text And under the MAIN ATARIBUTES section you will have Regular expression check field, i use this next regex to only accept in my field URL from soundcloud.com only. In this format: https:// or http:// (with or without www), soundcloud.com / user / song REGEX: Like this one: I hope it will be useful!  Youtube  1) It will accept this format: http or https 2) With or without www 3) .com only")* was created by *[oxido](/forum/user/29793-oxido "View oxido's Profile")*

I needed to use regex on my site on a custom text field and I think it's good that this regex created by me will not be lost, so I decided to post it here, and maybe other people will post they regex code they used and how.

So, in Hikashop i went to: **Hikashop &gt; Display &gt; Custom Fields**
I created a new field type: Text
And under the MAIN ATARIBUTES section you will have Regular expression check field, i use this next regex to only accept in my field URL from soundcloud.com only.
In this format: https:// or http:// (with or without www), soundcloud.com / user / song
REGEX: Code:

(https?://)(www.)?soundcloud\.com/[\w\-\.]+(/)+[\w\-\.]+/?

Like this one: [   ](https://soundcloud.com/0xid0/summer-nights/)
I hope it will be useful!

**Youtube**Code:

(https?://)(www.)?youtube\.com/?.+

1) It will accept this format: **http or https**
2) With or without www
3) **.com** only

Last edit: 8 years 2 weeks ago by [oxido](/forum/user/29793-oxido "View oxido's Profile"). Reason: Youtube regex added

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg5NDI0OS11c2VmdWwtcmVnZXgtZm9yLWhpa2FzaG9wLXJlZ3VsYXItZXhwcmVzc2lvbj90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.045 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
