Regular expressions primer for a newbie

Find, replace, find in files, replace in files, regular expressions

Regular expressions primer for a newbie

Postby stevetimko » Mon Apr 10, 2006 11:51 pm

I've been using UltraEdit for several years to do basic data munging. I've never taken the plunge, though, to learn regular expressions. I bought the O'Reilly computer book on regular expressions and it's not for a newbie like me.
Any suggestions on how I can get started?
User avatar
stevetimko
Newbie
 
Posts: 1
Joined: Sun Apr 09, 2006 11:00 pm

Re: Regular expressions primer for a newbie

Postby mrainey56 » Tue Apr 11, 2006 12:13 am

Here's a good place to start.

Remember, UE only has a subset of the regex capabilities you'll run into in discussions and books.


http://regexadvice.com/
User avatar
mrainey56
Master
Master
 
Posts: 212
Joined: Tue Jul 27, 2004 11:00 pm
Location: Spartanburg, South Carolina

Re: Regular expressions primer for a newbie

Postby Captain » Thu Apr 13, 2006 6:51 am

Check out Active Perl and the perlmonks.com website. There is plenty there to go on.
Good luck.
User avatar
Captain
Basic User
Basic User
 
Posts: 27
Joined: Tue Jul 26, 2005 11:00 pm

Re: Regular expressions primer for a newbie

Postby mjcarman » Thu Apr 13, 2006 12:30 pm

stevetimko wrote:I've never taken the plunge, though, to learn regular expressions. I bought the O'Reilly computer book on regular expressions and it's not for a newbie like me. Any suggestions on how I can get started?


You bought Mastering Regular Expressions? Good book, but definately not a tutorial!

First, pick your dialect. I recommend Perl as it's kind of the "gold standard" for regular expressions. Mofi is a big fan of UE's syntax, but you can't use it anywhere else. Perl's syntax derives from Unix, and most other implementations (JavaScript, Ruby, etc.) are very similar.

If you have Perl installed, there is lots of documentation in the perlre, perlrequick, and perlretut manpages. If you don't have Perl installed, you can find the docs online at http://perldoc.perl.org.
User avatar
mjcarman
Power User
Power User
 
Posts: 124
Joined: Thu Feb 10, 2005 12:00 am

Re: Regular expressions primer for a newbie

Postby tmaloney » Fri Apr 14, 2006 8:12 pm

A useful tool is the RegEx Coach. Download from here: http://weitz.de/regex-coach
User avatar
tmaloney
Newbie
 
Posts: 4
Joined: Sun May 08, 2005 11:00 pm

Re: Regular expressions primer for a newbie

Postby whatchamccallum » Wed Apr 19, 2006 5:08 pm

I am trying to get into RegEx searches I have tried the regex search of T(hread?|ask?)

However UltraEdit doesn't find any match and the text I am searching has both the work Thread and Task listed.

any ideas?

It worked with regex-coach
User avatar
whatchamccallum
Newbie
 
Posts: 3
Joined: Mon Apr 17, 2006 11:00 pm

Re: Regular expressions primer for a newbie

Postby tmaloney » Wed Apr 19, 2006 6:49 pm

Set your Regular Expression Engine to Perl compatible.

To get there:
Advanced | Configuration | Search | Regular Expression Engine
User avatar
tmaloney
Newbie
 
Posts: 4
Joined: Sun May 08, 2005 11:00 pm

Re: Regular expressions primer for a newbie

Postby whatchamccallum » Wed Apr 19, 2006 7:48 pm

I just found out that it would work much better if I upgrade to v12 on my laptop =)

Thank you that did it
User avatar
whatchamccallum
Newbie
 
Posts: 3
Joined: Mon Apr 17, 2006 11:00 pm

Re: Regular expressions primer for a newbie

Postby Rochesterbud » Tue May 09, 2006 1:19 am

go to

http://www.editpadpro.com/manual/EditPadPro.pdf

look at Regex tutorial beginning on page 78..You can print it out

Independent of the fact that it from a competitor of UE32, this tutorial is a labor of love and is also available as a book

http://www.regular-expressions.info/print.html

Bud
User avatar
Rochesterbud
Newbie
 
Posts: 1
Joined: Sun May 07, 2006 11:00 pm


Return to Find/Replace/Regular Expressions