(.*) . mean any character (number,alpha,special) * means zero or more times
Match any character but white space - min of 6 characters
preg_match('/^\S{6,}\z/', $string)
$ matches end of string or before a line break at end of string (if no modifiers are used)
\z matches end of string (independent of multiline mode)
Negative Lookaheads Match a Q not followed by a U: q(?!u).
Positive Lookaheads Match a Q followed by a U: q(?=u)
*
http://www.regular-expressions.info/lookaround.html
http://www.rwe-uk.com/app/oyster
youtube: { pattern: /^((http(s)?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\/(watch\?v=|v\/)?)([a-zA-Z0-9-]+)(.*)?$/, replace: 'http://www.youtube.com/v/$7&fs=1' }
.replace has no quotes in the first parameterhashtag = $("#hash_edit").text();
return hashtag.toLowerCase().replace(/#/g,'');
Negative Lookaheads Match a Q not followed by a U: q(?!u).
Positive Lookaheads Match a Q followed by a U: q(?=u)
*
http://www.regular-expressions.info/lookaround.html
Apps
http://www.rwe-uk.com/app/oyster
http://www.phpliveregex.com/ https://regex101.com/ http://regexr.com/