JavaScript Regex - How to check comma separated values are more than three -


I'm not good with JavaScript regex, so I need help in verifying your string for verification.

i These image names are being divided by commas: Chrysanthemum.jpg, Desert.png, Hydrangeas.gif, Jellyfish.jpg,

Now I want to check with this regex:

What is valid:

  crisanthimem.jpg, dessert page, hydrangease Gif, Jellyfish. JPGG, Koala.JPGG, Lighthouse page,   

is not valid:

  1 crisendammum JPGG, Desert Page, Hydrangea Gif, 2. Christmas. JPGG, Desert Page, 3. Crisatham JPG,   

Authentication should be successful only if the value of the value separated by commas is greater than 3.

The regex file name below will be valid for name extensions, except for the last one, And the comma-separated value is more than 3,

  ^ [az] [az] + \. (?: Jpg | png | gif), (?: [Az] [az] + \. (?: Jpg | png | gif),) {3,} $   

< / P>

If the values ​​are no different from the comma and the space then your regex will be,

  ^ [az] [az] + \. (?: Jpg | png | gif), (?: [Az] [az] + \. (?: Jpg | png | gif),) {3,} $   

< / P>

or

A very simple,

  ^ (?: [AZ] [az] + \. (?: Jpg | png | gif) ,) {4,} $   



Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -