I want to search and replace german version date like
14.05.2002 into this 2002-05-14.
I'm using this regex:
([0-9]+)[.]([0-9]+)[.]([0-9]+)
I am replacing with
\3-\2-\1
This is working very fine with Textpad 4.4.0
But Textpad v4.4.2 and later (v4.5) tells me it cannot find the regexpression!
What can I do?
RegExpression does work in v4.4 but not in v4.5
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Scott
Re: RegExpression does work in v4.4 but not in v4.5
Try \([0-9]+\)[.]\([0-9]+\)[.]\([0-9]+\)
-
Stephan
Re: RegExpression does work in v4.4 but not in v4.5
For grouping you'll need to put backslashes before the parens.
Therefore this should do:
\([0-9]+\)\.\([0-9]+\)\.\([0-9]+\)
Note that I also replaced "[.]" by "\.". This is partly just my personal tase, but I think it should be a bit faster, too. (Not that it counts much in this example - but then how knows how many dates you're going to replace.
Hope that helped.
Stephan
Therefore this should do:
\([0-9]+\)\.\([0-9]+\)\.\([0-9]+\)
Note that I also replaced "[.]" by "\.". This is partly just my personal tase, but I think it should be a bit faster, too. (Not that it counts much in this example - but then how knows how many dates you're going to replace.
Hope that helped.
Stephan
-
Andreas
Re: RegExpression does work in v4.4 but not in v4.5
Looks like the "Use Posix Regular expression syntax" is set differently on your 4.5 Textpad
I think after installation it is not checked.
It is the last check box on the "editor" page of the Configure/Preferences dialog
I think after installation it is not checked.
It is the last check box on the "editor" page of the Configure/Preferences dialog
-
Peter
Re: RegExpression does work in v4.4 but not in v4.5
Just waited one hour and voila, two solutions are working. Thats great.
With the "Use Posix syntax " checked it looks like the most simple solution.
Das wars. Häkchen hin und geht.
Thankx to all for your very fast and helpful answers.
Hallo und Grüsse an ".dip.t-dialin.net" und "dip0.t-ipconnect.de".
Textpad ist prima. Das Forum ist perfekt.
Nicht mal eine Stunde für die passende Antwort.
Danke.
With the "Use Posix syntax " checked it looks like the most simple solution.
Das wars. Häkchen hin und geht.
Thankx to all for your very fast and helpful answers.
Hallo und Grüsse an ".dip.t-dialin.net" und "dip0.t-ipconnect.de".
Textpad ist prima. Das Forum ist perfekt.
Nicht mal eine Stunde für die passende Antwort.
Danke.