Best way to learn regular expressions

Posted on 2012-03-22
Last Modified: 2012-08-14
What is the best way to learn regular expressions?
Should I use any software?
Thank you.
Question by:skiabox
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1

Expert Comment

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

Author Comment

ID: 37753745
I have a macbook pro , so I can use the bash shell.
LVL 75

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.
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

LVL 75

Accepted Solution

käµfm³d   👽 earned 150 total points
ID: 37753833

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.
LVL 41

Assisted Solution

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

Mastering Regular Expressions:

Author Closing Comment

ID: 37753949
Thank you so much guys!
LVL 41

Expert Comment

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

Expert Comment

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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about a problem I had getting the GPS LocationListener working.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

726 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