string - Convert spaces to tabs in RegEx -


How do you say the following in regex:

  foreach line look at the beginning string Convert 3 groups of each group to one tab Once a character is found in addition to a location, then stop it  

This is what I've done so far:

  / ^ + / \ t / g  

However, it converts everywhere to 1 tab

Any help will be appreciated .

with Pearl:

  perl -pe '1 while s / \ G {3} / \ For example, with the following input,  
  between the three loops, between three loops, three six places, three in the middle six, space  

Output (tab replaced by \ t ) is

  $ perl -pe '1 while s / \ g {3} / \ t / gc' input |  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -