I tried to use the following in a regular expression during a search and it gave the error that it can't find the word:
^.{10}
What I'm trying to do is insert a space after the 10th character in every line of a data file. I was planning on doing something like this:
Search: "^(.{10})"
Replace: "\1 "
Is this not possible? Is there a plug-in that would support more of the common regex syntax?
Thanks,
Matt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The RegEx function is built into the Scintilla component. For either Ctrl+F or Ctrl+R to handle it's own localized case or enhanced RegEx would be a major undertaking. The dialog would maintain it's own copy of the entire file during the replace process and would need to become modal to prevent editing.
The best solution is to improve RegEx in the Scintilla component.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah, I eventually just did that. However, I had several spaces I wanted entered at specific points and it got quite tiresome. I eventually did it all this way but it would be nice to see a more exhaustive regex ability.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is the regex search feature handled by the TextFX plug-in? I'd like to possibly update the code to allow for a richer regex ability. I just need to know where this is located.
Thanks,
Matt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to use the following in a regular expression during a search and it gave the error that it can't find the word:
^.{10}
What I'm trying to do is insert a space after the 10th character in every line of a data file. I was planning on doing something like this:
Search: "^(.{10})"
Replace: "\1 "
Is this not possible? Is there a plug-in that would support more of the common regex syntax?
Thanks,
Matt
The RegEx function is built into the Scintilla component. For either Ctrl+F or Ctrl+R to handle it's own localized case or enhanced RegEx would be a major undertaking. The dialog would maintain it's own copy of the entire file during the replace process and would need to become modal to prevent editing.
The best solution is to improve RegEx in the Scintilla component.
I guess you wanted to do something more sophisticated and used this as an example, but the brute force and ignorance approach would be
Search: "^(..........)"
Replace: "\1 "
Graham
Yeah, I eventually just did that. However, I had several spaces I wanted entered at specific points and it got quite tiresome. I eventually did it all this way but it would be nice to see a more exhaustive regex ability.
Is the regex search feature handled by the TextFX plug-in? I'd like to possibly update the code to allow for a richer regex ability. I just need to know where this is located.
Thanks,
Matt