tags:

views:

222

answers:

7

Can anyone tell me where I could start learning the usage of regular expressions in mvc applications?

Thanks Ritz

+2  A: 

You're going to need to be more specific about what you're trying to do, and what you're working with. Regex and M-V-C at an abstract level have nothing to do with one another.

Amber
+10  A: 

This is a good source to start with regex in general: http://www.regular-expressions.info

This is a good source to start with MVC in general: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

Note that they both have nothing to do with each other. If your question is actually more "Where do I use business logic in MVC applications?" or "Where do I use validation logic in MVC applications?" (both might include regex logic) then just ask that so. It's answered in the most MVC related articles/tutorials though.

BalusC
How come everybody points to regular-expressions.info (even google) and when I try to open the page it says the server is not reachable?!
ApoY2k
I upvoted you for the boldfaced word "NOTHING". :-)
Michael Dillon
Also note that regular-expressions.info has two products to help you build regular expressions.
pritaeas
@ApoY2k: contact your networkadmin. It's apparently blacklisted somehow. Can you access other .info domains? And so on.
BalusC
+1: same reason as Michael Dillon
Xinus
@ApoY2k: Its working for me too..
Xinus
+1  A: 

Regulazy (download link) is a very useful tool when learning regular expressions.

Marek Grzenkowicz
A: 

It doesn't matter whether it's an MVC application or some other kind of application- regexs are used for matching patterns in a string. So, if you need to match a pattern in a string, a regex is a good idea. If you don't need to match a pattern in a string, you don't need a regex. Note that regexes have limitations and sometimes you want an actual parser instead of just a regex.

Brian Schroth
+4  A: 

I highly recommend the book, Mastering Regular Expressions, Second Edition by Jeffrey E. F. Friedl (published by O'Reilly). I thought I knew regular expressions when I got this; I mostly bought it as a reference book for some of the more obtuse syntaxes (eg, backward looking non-consuming non-capturing matches). It turns out there was a lot I didn't know about RegExp, and this is one of few technical manuals that I've actually just sat down and read straight up.

Mastering Regular Expressions, Second Edition

MightyE
hah! I have the pocket reference. Incredibly useful.
Randyaa
A: 

For regex in general, I agree with BalusC on regular-expressions.info. You might also try playing around with Expresso and test strings to try and flesh out your understanding of regular expressions.

As others have already mentioned, regex has little to do with what type of application you are attempting to make.

Stacy Vicknair
A: 

Hi.Cats Who Code has a great article called 15 PHP Regular Expressions for Webdevelopers... very simple to learn:

http://www.catswhocode.com/blog/15-php-regular-expressions-for-web-developers

Regards

jesusbet