 |
|
 |
I have released a new version of the RegEx Tester tool. You can download it free from http://www.codeproject.com/KB/string/regextester.aspx and http://sourceforge.net/projects/regextester
With RegEx Tester you can fully develop and test your regular expression against a target text. It's UI is designed to aid you in the RegEx developing. It uses and supports ALL of the features available in the .NET RegEx Class.
|
|
|
|
 |
|
 |
Please correct the function to...
from .... txtDirectory.Text = Path.GetDirectoryName(dlgOpen.FileName);
to
txtDirectory.Text = Path.GetDirectoryName(dlgOpen.FileName.ToString());
so it will function ok
=======================
if (dlgOpen.ShowDialog() == DialogResult.OK)
{
txtDirectory.Text = Path.GetDirectoryName(dlgOpen.FileName.ToString());
}
|
|
|
|
 |
|
 |
I already made in the past an article about file renaming which did not get much attention (see 'File rename using boost regex and boost file system'). That article was also about the use of Boost libraries like Boost.FileSystem and Boost.Regex. Obviously your article uses c# and a 'sharper' GUI. Wkr me
|
|
|
|
 |
|
|
 |
|
 |
psyphen wrote: i like pancakes
Without maple syrup?
With respect, I must disagree. A quick look at middle management in just about any corporation shows that the dodo not only survived, it's reproducing in record numbers. Christopher Duncan
|
|
|
|
 |
|
 |
Hi,
Good learning article on using reg-ex, but do you know Rename Master (http://www.joejoesoft.com/rm.php) ? This is a really powerful file rename tool I often use.
Thanks for you article,
Lbas
|
|
|
|
 |
|
 |
I just have to say it
I had recently written a similar app myself for a client who was scared of command lines. It seems that we took a similar approach; good to see that I am not as crazy as friend had told me when I said that I'd be using REs.
Cheers
My Blog
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
- -Lazarus Long
|
|
|
|
 |
|
 |
One of the things you might want to do when you're renaming those episodes is to change the folder structure in which they're stored. Correct me if I'm wrong, but it seems that's not currently supported.
|
|
|
|
 |
|
 |
No its not i'm afraid, this is just for file names alone. Eventually i may update this to allow you to insert .net code in the replace window to do the replacement how you choose, it wouldnt be hard.
--
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
|
|
|
|
 |
|
 |
RenameIt has a slightly different interface, but has the same basic idea as well as a couple non-regex renaming features. The SourceForge project hasn't seen much activity in recent years, but the tool has been around in various versions and places since 1998.
|
|
|
|
 |
|
 |
Interesting, i haven't seen it before. Thats the problem with SF, many people create their project all gung-ho and excited, then when it doesnt get much interest they forget about it and never change it
I'm sure if you looked you'd find 3 or 4 more of these around on SF in various stages of completion hehe.
--
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
|
|
|
|
 |
|
 |
Hi,
Looks like this is a great idea!
Could you compile a 32bit version for us that are slower at changing to newer OS?
or could you post the code for .NET 1.1?
Thanks,
Daniel
|
|
|
|
 |
|
 |
The x86 version should be 32 bit, if it wont run, its probably something evil that vista did - so i'll recompile at work and then repost.
Doing .net 1.1 code would be a bit of a pain as its all done in VS2005 - would have to re-create the entire project.
--
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
|
|
|
|
 |
|
 |
The x86 works in XP but looks like I need to have .NET 2.0 to run it! Too bad, not ready to change yet... too many project on 1.1 at the moment!
Thanks for you help,
Daniel
|
|
|
|
 |
|
 |
Go ahead and install .net 2.0, it runs side by side with 1.1 just fine. You can have both versions installed. Additionally, 2.0 will run any 1.1 applications.
--
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
|
|
|
|
 |
|
 |
The spare tyre on my car takes up space that I could use for something else. But someday an event will occur and the spare tyre is the only thing that will help.
Your article handles a specific problem you had very well. While you may not use it everyday, it is the best tool for the job.
Well done,
Jef.
PS I like your endnote: "Real programmers don't comment their code. It was hard to write, it should be hard to understand."
|
|
|
|
 |
|
 |
I mean, it's a good idea but why would you use regex for it? you can simply use the string.Contains method can't you?
|
|
|
|
 |
|
|
 |
|
 |
Well, true, to be honest i was never really able to understand regular expressions, nor could i find any good documentation about them :\
Nice article btw.
|
|
|
|
 |
|
 |
Regular Expressions are massively powerful, i couldn't live without them. I learnt them back when working in perl 5 years ago. At first they can seem a bit daunting, but once you learn to use them they are very very cool I might have to write an article on using them.
In the mean time you could look at these:
http://www.regular-expressions.info/quickstart.html[^]
http://www.regular-expressions.info/tutorial.html[^]
--
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
|
|
|
|
 |
|
 |
If you want some hands on practice to learn and test regex expressions, I've found this tool created by Dr Edmund Weitz is excellent: http://weitz.de/regex-coach/
It lets you throw any string of characters into one text box and play with regular expressions in a second box. Text is highlighted live as soon as it matches. It also supports replacement text and other more advanced regex stuff.
I'm not really an RTFM guy and need play with things to figure them out. Regex is one of those things I find particularly hard to visualize and something I really need to fiddle with a lot to get right (I need regex when I'm working with XPaths).
----------------
Derek Read
|
|
|
|
 |