Skip to main content
added 4 characters in body
Source Link
user1133275
  • 5.7k
  • 1
  • 22
  • 40

You could start with

perl -pe 's/,/./g;s/  +/,/g' rules.txt

Thenthen delimit by comma. Both this in the comment with awk use regular expressions which are the popular tool set for manipulating text.

' +'( +) is a synonym for ' {2,}'( {2,}) both meaning 'two"two or more spaces'spaces". The "+" is preceded by two spaces but stackexchange inline code blocks do not respect white spaces...

You could start with

perl -pe 's/,/./g;s/  +/,/g' rules.txt

Then delimit by comma. Both this in the comment with awk use regular expressions which are the popular tool for manipulating text.

' +' is a synonym for ' {2,}' both meaning 'two or more spaces'.

You could start with

perl -pe 's/,/./g;s/  +/,/g' rules.txt

then delimit by comma. Both this in the comment with awk use regular expressions which are the popular tool set for manipulating text.

( +) is a synonym for ( {2,}) both meaning "two or more spaces". The "+" is preceded by two spaces but stackexchange inline code blocks do not respect white spaces...

spelling
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

You could start with

perl -pe 's/,/./g;s/  +/,/g' rules.txt

Then delimit by comma. Both this in the comment with aukawk use regular expressions which are the popular tool for manipulating text.

' +' is a synonym for ' {2,}' both meaning 'two or more spaces'.

You could start with

perl -pe 's/,/./g;s/  +/,/g' rules.txt

Then delimit by comma. Both this in the comment with auk use regular expressions which are the popular tool for manipulating text.

' +' is a synonym for ' {2,}' both meaning 'two or more spaces'.

You could start with

perl -pe 's/,/./g;s/  +/,/g' rules.txt

Then delimit by comma. Both this in the comment with awk use regular expressions which are the popular tool for manipulating text.

' +' is a synonym for ' {2,}' both meaning 'two or more spaces'.

Source Link
user1133275
  • 5.7k
  • 1
  • 22
  • 40

You could start with

perl -pe 's/,/./g;s/  +/,/g' rules.txt

Then delimit by comma. Both this in the comment with auk use regular expressions which are the popular tool for manipulating text.

' +' is a synonym for ' {2,}' both meaning 'two or more spaces'.