Columns 1 through 6
Inf 5793 4096 3344 2896 2591
Columns 7 through 12
2365 2189 2048 1931 1832 1747
Columns 13 through 18
and I want to get it into a list of numbers, separated by commas.
I've used ^\n to remove blank lines, ^.*Columns.*\n to remove lines with column on and ^ * to remove leading spaces (first bit of regular expression that I've attempted ).
How do I replace the spaces between numbers with a comma. I've tried * (space followed by *) but it doesn't work.
I know it's a simple thing but sadly my knowledge of regular expressions is simpler
The problem I see with matching " *" is that it'll match zero or more spaces - so this'll match between every character, because there are "zero or more" spaces between every character. The plus sign means to match one or more characters, so matching against " +" (space followed by plus) would probably also have worked for you. Now if there really are some tab characters in the document, you do need to use "[ \t]+", where the brackets mean to match any one of the included characters - a space or a tab.
Hmm, when I try matching " *" in Textpad, it hangs up on me. Presumably it fell into an infinite loop.
Also, the reason "^ *" works where " *" doesn't is because the carat "^" is an anchor. It tells the regex that this matches only at the beginning of a line. Click the "help" button in the replace dialog for a good description of how to use regular expressions.