Regular Expression that accepts any number letters and '-' '\'

Can you suggest regular expressions for both PHP and HTML5 that accepts numbers, letters and '-' '\' ?

BUT any string must have a length between 4 and 30 chars.

HTML 5:

 <input name="route" id="route" type="text" required title="4 to 30 characters/ 0-9 / A-Z/./'/'"   pattern="????"/>

PHP:

!(preg_match(?))

Answers


Use this Regex

^([A-Za-z0-9\/-]{4,30})$

Need Your Help

Codeigniter access emails with Image as attachments (pop3 imap)

php codeigniter imap pop3

I want to download to get the following information from my emails

SetAccessControl "unauthorized operation" even when run as administrator

c# permissions

I am trying to take ownership and change the ACL of a file in C#, but even as an administrator I am getting the exception: