| View previous topic :: View next topic |
| Author |
Message |
tempamir
Joined: 25 May 2012 Posts: 2
|
Posted: Fri May 25, 2012 10:37 am Post subject: EOL Regular expression and crash. |
|
|
If I have text file open with:
And I use Edit>Replace:
Then Akelpad crashes.
Also, what regular expression can I use to change this:
| Quote: | Test
D
;Earth;Mars
E
;Saturn
F
;Jupiter;Venus |
Into this:
| Quote: | | Test;Earth;Mars;Saturn;Jupiter;Venus |
|
|
| Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 4649
|
Posted: Fri May 25, 2012 3:11 pm Post subject: Re: EOL Regular expression and crash. |
|
|
| tempamir wrote: | | Then Akelpad crashes. | Test version
| Quote: | | Also, what regular expression can I use to change this... | With SearchReplace.js:
What: (.*?)\n+
With: if ($1.length > 1) return $1;
[v] Regular expressions
[v] Replace with function |
|
| Back to top |
|
 |
tempamir
Joined: 25 May 2012 Posts: 2
|
Posted: Fri May 25, 2012 8:00 pm Post subject: Re: EOL Regular expression and crash. |
|
|
Thanks, that fixed it, now returns Syntax Error as it should.
| Instructor wrote: | With SearchReplace.js:
What: (.*?)\n+
With: if ($1.length > 1) return $1;
[v] Regular expressions
[v] Replace with function |
Didn't quite work, it returned: | Quote: | | TestD ;Earth;MarsE ;SaturnF ;Jupiter;Venus |
I need it to return: | Quote: | | Test;Earth;Mars;Saturn;Jupiter;Venus |
This seems to work: | Quote: | With SearchReplace.js:
What: \n+(.*?)\n+
With: ;
[v] Regular expressions
[v] Replace with function |
Or is there a better way?
Anyway, my problems are solved, thank you for quick response.[/quote] |
|
| Back to top |
|
 |
|