Character classes in RegEx

Discussion of bugs and problems found in Altap Salamander. In your reports, please be as descriptive as possible, and report one incident per report. Do not post crash reports here, send us the generated bug report by email instead, please.
User avatar
SvA
Posts: 486
Joined: 29 Mar 2006, 02:41
Location: DE

Character classes in RegEx

Post by SvA »

Ether wrote:The regex implementation used in Salamander uses predefined character classes in the [[:digit:]] format.
The documentation of the RegEX library by Henry Spencer says so, alone I cannot get it to work in Salamander. Moreover it is not mentioned in Salamander's help file. (I consulted documentation to Henry Spencer's RegEx library, because I could not find a library named REGEXP as stated by Salamander's help file)

Are predefined character classes supported by Salamander's Regex?
Is there any way to specify a a control character in a regex or any other way to search for horizontal whitespace consisting of blanks and/or tabs?

(I experimented with search within internal viewer, but regexp ought to be consistent throughout the program anyway.)

May I suggest to Altap development team to switch to a more modern regex library when adding unicode support, one that supports shorthand character classes, hex- octal- and unicode codepoint character specification, non-greedy operations ...
User avatar
Ether
Posts: 1471
Joined: 10 May 2007, 16:08
Location: Czech Republic
Contact:

Re: Character classes in RegEx

Post by Ether »

I'm all in for a more powerful regex library. I'm used to Perl regexes and when I write patterns in other applications (SciTE, Salamander), sometimes I wonder why they're not working (then I realize that some parts are apparently not supported).
SvA wrote:Are predefined character classes supported by Salamander's Regex?
Just invoke Batch Renamer and click on the black arrow next to the Search for field and look in the submenus. They should work everywhere Salamander accepts regular expressions.
Ελληνικά rulez.
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5231
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Character classes in RegEx

Post by Jan Rysavy »

The Renamer plugin is using own implementation of regular expressions, it is not using internal Salamander Regex library from Henry Spencer. Renamer has regular expressions nearly compatible with http://www.pcre.org/

Note: we should consider Visual C++ TR1 regular expressions (2008+) http://www.johndcook.com/cpp_regex.html or Boost.Regex library http://stackoverflow.com/questions/1816 ... ould-i-use
Post Reply