[Geany] New to geany: regexp problem

Matthew Brush mbrush at xxxxx
Fri May 25 03:39:39 UTC 2012


On 2012-05-24, at 12:48 AM, Lex Trotman wrote:

> On 24 May 2012 17:36, Alessandro Pasotti <apasotti at gmail.com> wrote:
>> 2012/5/24 Lex Trotman <elextr at gmail.com>:
>>> On 24 May 2012 17:07, Alessandro Pasotti <apasotti at gmail.com> wrote:
>>>> Hi all,
>>>> 
>>>> Recently I started using Geany and I like it very much, light,
>>>> configurable and fast.
>>>> 
>>>> The only thing I miss is that I cannot use  \d, \w and \s       (shorthand
>>>> character classes matching digits, word characters etc.) in regexp
>>>> search/replace, is this just me?
>>>> 
>>>> A feature or a bug?
>>>> 
>>>> Should I file a ticket?
>>>> 
>>>> I'm on latest (k)ubuntu Linux 64 bit if that matters.
>>> 
>>> Hi,
>>> 
>>> Works for me, what version are you using?
>> 
>> Hi Lex,
>> 
>> thanks for checking, version is 0.21, one expression that doesn't work
>> is for instance:
>> 
> 
> Ok, we changed the regex implementation post 0.21 release.
> 

Yep, the regexp syntax changed with the PCRE/GLIB implementation.

> You can always try the git or nightly tarball version bearing mind
> that these are development versions.
> 
> Cheers
> Lex
> 
>> text:
>> 
>> pind2dir, pind12dir
>> 
>> 
>> regexp (doesn't work):
>> 
>> pind(\d+)dir
>> 

The Perl-like syntax is available in the development sources (or nightly builds). For the current release, you can use  `[a-zA-Z]` or whatever the equivalent is for \w as you said. IIRC it's (something like) POSIX (or is it GNU-specific?) regexp syntax, so maybe even those weird `[[:alnum:]]` and `[[:alpha:]]` things also work. For \s I usually used something like `[ \t]` IIRC.

Cheers,
Matthew Brush




More information about the Users mailing list