Jump to content

Optional Ends With


RobertP

Recommended Posts

/^&[a-zA-Z0-9-]{3,}[^-]$/

 

//Edit

 

If you meant ends with an alpha-numeric character, this rule matches '&' followed by AT LEAST 2 alphanumeric and hyphen characters, followed by one or more alphanumeric character

 

/^&[a-zA-Z0-9-]{2,}[a-zA-Z0-9]+$/

Link to comment
https://forums.phpfreaks.com/topic/264459-optional-ends-with/#findComment-1355267
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.