|
Favorite tutorials |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Hey everybody. I have struggled with understanding regular expressions for a while now, but after reading the tutorial below, I feel I have a very good grasp on what they mean. If you have any similar experiences, or want to post your favorite tutorials (for whatever) please share. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Ariesnl
Member #2,902
November 2002
|
That regex tutorial is great! Back in the Dos days there where a lot of great tutorials around. I do have some on paper (some still valuable) but they are gone on the web as far as I know. Denthor's VGA trainer for example. And Peroxide graphics and game tuts ( Turbo Pascal) Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard) |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I found another handy tutorial set on windows batch (.bat) scripts here : http://www.robvanderwoude.com/batchfiles.php and some useful tricks here : http://stackoverflow.com/questions/245395/hidden-features-of-windows-batch-files My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Derezo
Member #1,666
April 2001
|
Codecademy has come a long way now. I disagree with some of the press and hype behind it, but they have a nice approach. "He who controls the stuffing controls the Universe" |
bamccaig
Member #7,536
July 2006
|
I already understood the basics, but I really got a good understanding of regular expressions when I learned Perl. I started by reading the manual pages, written as "perldocs", distributed with each system. I pretty much read the first 10 or 20 files. Perl has excellent documentation. Along the way, there was the section on regular expressions, which are obviously extremely powerful in Perl. I would recommend that as a way to understand regular expressions, though it would probably come in handy to learn the basics of Perl first so you were able to try it out in its proper environment. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
OnlineCop
Member #7,919
October 2006
|
A video I've referred people on the Freenode #regex channel (IRC) frequently is https://www.infoq.com/presentations/regex. Then I refer them to my https://regex101.com site so they can post their questions and play around with regexes, and if/when they get stuck, they can save the link and post it in chat for us to come visit and help them figure out what to improve. I always find that "live help" is better sometimes than waiting for hours or days for a single response, like on https://www.reddit.com/r/regex/.
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Derezo said: Codecademy [www.codecademy.com] has come a long way now. I disagree with some of the press and hype behind it, but they have a nice approach. I'm testing it out to learn Ruby. But the pace is SO SLOW>>>>. I'm on lesson 10 or so and it's still teaching me how to set variables. EDIT bamccaig said: I started by reading the manual pages, written as "perldocs", distributed with each system. I pretty much read the first 10 or 20 files. Perl has excellent documentation. This is classic bamccaig. I would totally put this in my sig if I wasn't already quoting classic Piccolo. I despise man pages. :/ OnlineCop said: Then I refer them to my https://regex101.com site so they can post their questions and play around with regexes, and if/when they get stuck, they can save the link and post it in chat for us to come visit and help them figure out what to improve. Your website looks really useful. I will definitely keep that bookmarked. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Derezo
Member #1,666
April 2001
|
Edgar Reynaldo said: Codecademy's tutorial is for people who don't even know what a variable is. It's really not up to snuff for someone who already knows how to code. A lot of them are quite basic and entry level. My bad. I used a pocket reference to learn regex combined with other tools. Once you understand how it works you can look up the regex patterns you'll need for the language you have. The o'reily pocket reference had a lot of different languages in it and their variations from each other. [edit] I use Expresso a lot when I'm building regex's, it breaks them down in a way that is easy to see what you're doing when things get complicated. "He who controls the stuffing controls the Universe" |
bamccaig
Member #7,536
July 2006
|
A good strategy to break regular expressions up is white-space. In Perl you have /x that will ignore white-space within the actual regular expression (including newlines). It also enables the use of comments within it (prefixed with a '#' character as with other Perl comments). By allowing you to separate the ideas within a regexp it becomes much easier to reason about it. And obviously comments help too. Some other engines also support this concept. If the regexp is non-trivial it is recommended to use this technique. You then match white-space characters using character classes or character sets. As for your description of Code Academy, that sounds about what I recall from whatever glimpse I was able to get years ago... I don't generally give those kinds of sites much credit because they're obviously just trying to get rich by withholding information which I believe to be unethical. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Gideon Weems
Member #3,925
October 2003
|
Edgar Reynaldo said: I despise man pages. :/ I love 'em. Man pages use your default pager, unlike info, which I despise for thinking it's special and gets to impose a whole, new set of keyboard shortcuts on the user. Of course, an EMACS user might quip that if one would simply immerse oneself in EMACS, info pages would make more sense... at which point I would leave him alone. On that note, if you'd like a little more RSI to get that workers' comp you've had your eye on, there is a nice EMACS tutorial site out there. And if you've been wanting to learn the ropes of Python, look no further than A Byte of Python. Lastly, if any of you have been under a rock or inside a womb during this millennium, I am obligated to tell you about the wonder that is Sin & Cos: The Programmer's Pals. 日本語のできる方なら耳より正規表現入門がおすすめです。 |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Gideon Weems said: I love 'em. Man pages use your default pager, unlike info, which I despise for thinking it's special and gets to impose a whole, new set of keyboard shortcuts on the user. The keyboard shortcuts are not intuitive at all, nor are they available easily, for either. I always struggle just to quit the stupid program and get it's junk off my screen. It's a GUI wannabe. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Gideon Weems
Member #3,925
October 2003
|
bamccaig
Member #7,536
July 2006
|
Experience on the command line helps. 'q' is often the way to "quit" interactive programs on the command line (Ctrl+C is another common way, better if the program is doing something you definitely don't want done right now). It's very much standardized. I'll stand behind 'info' being very unwieldy and uncomfortable. I've made some attempts to learn it and can still barely accomplish the most basic navigation. I practically never find what I'm looking for in info documentation. Man pages on the other hand tend to be awesome. Most information is on that single "page" (or pager), and it reads very well. If you need to find specific information you can easily search the document. You won't always find what you're looking for, but sometimes the software just doesn't do what you're looking for. In my experience, when the software does what I'm looking for I find it 9/10 in man pages. I'm sure it would be in the info. documentation too, but the problem with that is that it's fragmented and the navigation is unintuitive unless you're an Emacs user. I've tried to learn that too, and all that I learned is that it's painful to edit using Emacs compared to Vim. But again, I know enough for basic navigation. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Gideon Weems said: Pressing "q" always seemed natural to me for quitting. (It's closer than escape, too.)
bamccaig said: 'q' is often the way to "quit" interactive programs on the command line (Ctrl+C is another common way, better if the program is doing something you definitely don't want done right now). It's very much standardized. I'll stand behind 'info' being very unwieldy and uncomfortable. I've made some attempts to learn it and can still barely accomplish the most basic navigation. Maybe we're using different programs, but q never quits for me. And neither does Ctrl-C due to overridden interrupts. Maybe it's 'info' that I hate, but I can't remember ever being glad to use 'man' either. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|