Regex pattern can't figure out

This will work ^\d{4}-\d{3,4}-[23]$ Regex Demo Regex Breakdown ^ #Start of string \d{4} #Match 4 digits – #Match – literally \d{3,4} #Match 3 or 4 digits – #Match – literally [23] #Match 2 or 3 $ #End of string

regular expression [closed]

If the rest of the url never changes, then you don’t need a regular expression. Just store the first part of the url in a string: $url_prefix = “http:// www.badoobook.com/clips/index.php?page=videos&section=view&vid_id=”; then append your identifier to it: $id = 100162; $full_url = $url_prefix + $id;

regex except string

Try this: https?:\/\/example[.]it\/(?!hello).* Working example: http://regexr.com/3dc97 I’m guessing the follow up question would be if you can make domain dynamic but I’m sure you can figure that out.

I need a Javascript REGEX for Integers between 18 and 140 inclusive [closed]

When Answering your question, I am not the person to ask why you need regex for this. And the regex you want is /^(1[89]|[2-9][0-9]|1([0-3][0-9]|40))$/ Sample var age=/^(1[89]|[2-9][0-9]|1([0-3][0-9]|40))$/; console.log(age.test(18)); console.log(age.test(140)); console.log(age.test(12)); console.log(age.test(142)); But, you can simply use the following code to test if(age>=18 && age<=140) That is function test(age){ return age>=18 && age<=140; } console.log(test(18)); console.log(test(140)); … Read more