Is there any ways to find what's lacking in the test file(s), not what's in there?
For example: I need to find entries where the "=" sign is not accompanied by a space before and after. Everywhere else there is a space, like "name = xyz", but in some places it might look like "name=xyz". The second variant is wrong, and I need to find such entries and correct them. Manual search won't work, since number of entries is enormous.
Is there any software for doing such things, or (better) is there a way to do this in an ordinaty text editor like EditPlus or EditPadPro?
In the regular notepad, CTRL+F does what you request, and it finds this kind of search you are interested. If you want to edit some .ini files, maybe Notepad is the solution:)
Anyway, ctrl+f is a regular combination for in-text search. Try this in your text programs, it may work.
My computer knowledge is very limited, hope this helps:D
I don't know any program with the not modifier on the search field. Still, i can write a little proggie to make the job, and correct the mistakes automatically.
(If you find any mistake in my English, please let me know via a PM)
(Really, I speak terrible English, so please, tell me if I make mistakes. I'd like to improve it a bit )
In the editor normally is a function "Exchange". Now you are ordered to tipp in what are you searching for and another field you make your entry with what the serched one shall be exchanged. This might be the fastest way i think.
Angel of Mercy, it's not what you are thinking about.
Korrd, a program would be very nice. If possible, let it open a bunch of ini files at once (with subdir search), and search, not necessarily fix (better fix manually). It's for FL modding, obviously.
I think what you mean is called regular expressions. A very powerful string search and replace engine. It's not very friednly though, sometimes you can loose your head trying to understand what that long expression means but still it's very useful, I have been using it for quite some time and it came out handy at times saving a lot of time.
Many advaned text editors support regular expressions in some way. I can't say if EditPad does, I use TextPad personally, but I'm sure it does.
I can make you replacement expression if you tell me what symbols are allowed in those values (especially if spaces are allowed within the value).
In your case it would probably be this (doesn't work if you have spaces in values, for that it needs to be modified a little bit):
Search expression: "^([[:alnum:]]+)[\ ]*\=[\ ]*([[:alnum:]]+)$"
Replace expression: "$1 = $2" with <strike>PCRE_UNGREEDY flag set on</strike> (figued it's not needed there)
Look for regular expression support in your text editor, usually it is in "search and replace" tool, typically a checkbox enabling usage of expressions in fields.
I use regular expressions a lot when I need to clean up someone's else code (I like when everything looks in the very same style and syntax).
edit:
Ok, here is search expression if you want to have spaces (or just any symbol except for "=" and newline) in values: "^(?U)(.*)[ ]*\=(?-U)[ ]*(.*)$". Replace expression is the same as in previous example.
All it does it looking for lines with pair "value1= value2" no matter now many spaces are between "value" and "=" (there can be none, one, two, three spaces, etc), the result will always turn it into "value1 = value2" pair.
I hope this helps.
Regular expression is a very powerful tool. Coding a dedicated program for this purpose is overkill, IMO.
I will begin writing a specific version this Saturday, as right now I'm on a deadline to deliver a project module for my work. I have to complete it for... yesterday... D: so i can't give a split second to anything else, or my boss will kick me to that prison system that was just added..
(If you find any mistake in my English, please let me know via a PM)
(Really, I speak terrible English, so please, tell me if I make mistakes. I'd like to improve it a bit )
Treewyrm: EditPad does support regular expressions, but the ones you've posted didn't help for some reason. Probably used them incorrectly, or... anyway, they scare me.
And a program won't be an overkill. With more searches through ini than just "=" it could become a good tool for modders that can even be released for public. I had a hard time finding a text editor that could open many ini files at once with subdir search, for example.
Ok, I fixed expression for EditPad, it uses different syntax for inline modifiers, here is the one that works: "^(.*?)[ ]*\=[ ]*(.*)$". I tested it in EditPad (installed it specifically to see what's wrong) and it works.