Jump to content

What is [50-99] in regular expression?

shivajikobardan

As the slide says, it's not 50-99 characters so what it is?

4PcMwki10cMYO0nSLTgD-lc3iznryzE1oFa58rnCc71iB7yDlNd7iRWT3VS_uLzED3vsoX3pz_aBdgqSd0yRpaRSzlHhBdftfkB2n6f3ruV17KBeHMwlbT9zlLDERj0gk4w39edGBzlSPDxPmiqvcz9UjWNJKyeZR2DyyMOULpLAZS0IaLfjCjF0kCR-sA
Source: https://www3.cs.stonybrook.edu/~pfodor/courses/CSE307/L02_Programming_RE.pdf

Also, please tell me how to learn regular expressions? Recommend some university/any courses to take for learning regular expression for backend development. (Not the one we learnt in theory of automata and computation).

There  are lots of resources to learn it like regexpal for testing regular expressions, regexone.com for learning it. But how'd you learn it? Like what process do you follow to learn it?

Which book would you recommend out of these?
1) Beginning regular expressions Andrew Watt
2) Introducing regular expressions oreilly
3) Introducing regular expressions oreilly
4) Javascript regular expressions packt
5) Mastering regular expressions oreilly
6) Regular expressions pocket primer
7) Regex quick syntax reference
 

Link to comment
Share on other sites

Link to post
Share on other sites

Here's an explanation from Regex101:

197903620_regex101buildtestanddebugregex2022-12-1218-06-08.png.4f5b4ba7abcc9844a4a86ea22ad64d3e.png

 

So it matches 5 and 9, but it also matches 0-9 → it's the same as [0-9].

 

You should definitely try out Regex101, I use it all the time when I need to write some RegEx.

🙂

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/12/2022 at 5:56 PM, shivajikobardan said:

it's not 50-99 characters

 

That would be {50,99}.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

 

Here are some ressources which are quite good:

  • "Mastering Regular Expressions," 3rd edition, by Jeffrey E.F. Friedl is a comprehensive guide to regular expressions that covers a wide range of topics and includes many examples and exercises. This book is considered a classic and is widely recommended as a resource for learning regular expressions.

  • "Regular Expressions Cookbook," 2nd edition, by Jan Goyvaerts and Steven Levithan is another popular resource for learning regular expressions. This book includes a wide range of examples and covers a variety of programming languages and contexts in which regular expressions are used.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, Dat Guy said:

 

That would be {50,99}.

@duncannah was right, it's equivalent to [0-9] or {0,1,2,3,4,5,6,7,8,9},  It's not {50,99}

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×