Want help with RegEx

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Gingo
Junior Member
Junior Member
Posts: 20
Joined: 2003-07-12, 20:34 UTC

Want help with RegEx

Post by *Gingo »

I'm a total newbie with the RegEx language, so I need some help. I haven't been able to figure out how to do what I want via the help file, so I ask the experts.

Problem: I have a list of numbered files, but there are no padding zeroes before the lower numbers, so the list looks like this:

file1
file10
file11
file2

and so on.

What I would like to do (and I hope this is possible) is to use RegEx in the selection dialog to just select the files with only one digit at the end. How would I do this?

Help!!!
Jojo
Junior Member
Junior Member
Posts: 29
Joined: 2003-02-24, 10:31 UTC

Post by *Jojo »

Here you go Gingo:

Code: Select all

file\d{1}\b
User avatar
petergus
Member
Member
Posts: 164
Joined: 2003-02-06, 16:28 UTC
Location: Sweden, Enköping
Contact:

Post by *petergus »

Just a remark, if you add SortUpper=2 to
your [Configuration] section in Wincmd.ini
your list will look like this:

file1
file2
file10
file11

This is a new thing in TC 6.

// Peter
User avatar
petergus
Member
Member
Posts: 164
Joined: 2003-02-06, 16:28 UTC
Location: Sweden, Enköping
Contact:

Post by *petergus »

And about your problem, Gingo.

You don't need to use RegEx.

Just search for "file?"

// Peter
User avatar
Gingo
Junior Member
Junior Member
Posts: 20
Joined: 2003-07-12, 20:34 UTC

Post by *Gingo »

petergus wrote:And about your problem, Gingo.

You don't need to use RegEx.

Just search for "file?"

// Peter
If all files were named "file" that would work, but they're not. They have different names, so to avoid having to type the name (which sometimes is quite long) I want a universal method.

Petergus: I will try the SortUpper function. I did remember hearing that it would be possible to do so in v6, but I couldn't find anything in the help or the configuration.
User avatar
Gingo
Junior Member
Junior Member
Posts: 20
Joined: 2003-07-12, 20:34 UTC

Post by *Gingo »

Jojo wrote:Here you go Gingo:

Code: Select all

file\d{1}\b
Thanks! With a little change to

Code: Select all

[a-z]\d{1}\b
I get all the files I want regardless of their name.
Post Reply