1 Reply Latest reply on Aug 2, 2014 3:45 AM by Johnwhite

    How can set a var array for tabs?

    Johnwhite Level 1

      Hi eveyone,

       

      Is that possible to set a var array for tabs

       

      for instances:

      var oneTab = RegExp(“(.+)\\r”)
      var twoTab = RegExp(“(.+)\\t(.+)\\r”)
      var threeTab = RegExp(“(.+)\\t(.+)\\t(.+)\\r”)
      var fourTab = RegExp(“(.+)\\t(.+)\\t(.+)\\t(.+)\\r”)
      var firstCol = RegExp(“(.+)”)
      var firstTwo = RegExp(“(.+)\\t(.+)”)

       

      if

      null + oneTab or twoTab or threeTab or fourTab
      insert two tab before

       

      if

      firstCol + tab + oneTab or twoTab or threeTab or fourTab
      change to firstCol + tab + tab + oneTab or twoTab or threeTab or fourTab

       

      if

      firstTwo + oneTab or twoTab or threeTab or fourTab
      remain the same

      How can I do that?

       

       

      BEFORE CHANGE:

       

      before.jpg

       

      AFTER CHANGE:

       

      after.jpg

       

       

      thanks

       

      John

        • 1. Re: How can set a var array for tabs?
          Johnwhite Level 1

          Hi,

           

          or I can change idea into this:

           

          \\================================================

          var firstCol = RegExp("~m*~_? ?([\\u\\l]).+?\\t")

          var mediumCol = RegExp("(.+)\\t")

          var lastCol = RegExp("(.+)|((.+)\\t)+(.)")

           

          if null + lastCol

          change to: RegExp("\\t\\t") + lastCol

           

          if firstCol + lastCol

          change to: first + RegExp("\\t") + lastCol

           

          else remain the same

          \\=============================================

           

          but I don't know how to do this

           

          thanks

           

          Jonh