Solved

Best way to learn regular expressions

Posted on 2012-03-22
8
409 Views
Last Modified: 2012-08-14
What is the best way to learn regular expressions?
Should I use any software?
Thank you.
0
Comment
Question by:skiabox
  • 2
  • 2
  • 2
  • +1
8 Comments
 

Expert Comment

by:initdotdan
ID: 37753681
Use any *nix box. Use vi on your *nix box. You can study up on advanced file processing on vi.
0
 

Author Comment

by:skiabox
ID: 37753745
I have a macbook pro , so I can use the bash shell.
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 37753821
Practice, practice, practice!   = )

In all seriousness, I started participating here in the regex TA, and most of my knowledge in regex has come from helping others solve their regex quandaries. This gave me many opportunities to practice regex.

You have to be mindful, though, that different languages and different text editors don't always implement the same regex engines or even use the same regex syntax. Just because you understand regex in one language, the text editor you use may use an entirely different syntax. Generally speaking, the theory behind regex is universal. Although different languages/editors may implement different engines, a regex is more or less a state machine. You don't really need to understand all of the gory details of a state machine in order to understand regex, but at times it may help you to understand why a regex is performing a certain behavior.
0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 150 total points
ID: 37753833
P.S.

I highly recommend the following site for a regex library. It really breaks it down for you what each construct means in regex, and even goes so far as to telly which constructs are supported in which languages.

www.regular-expressions.info
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 41

Assisted Solution

by:HonorGod
HonorGod earned 150 total points
ID: 37753907
And this is "the" book:

Mastering Regular Expressions: http://www.amazon.com/dp/0596528124
0
 

Author Closing Comment

by:skiabox
ID: 37753949
Thank you so much guys!
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 37754165
Thanks for the assist, and the points.
Good luck & have a great day.
0
 

Expert Comment

by:initdotdan
ID: 37757466
You can use the Terminal and vi on your Macbook pro.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now