Results 1 to 3 of 3

Thread: How to strip extra tabs in my JS editor?

  1. #1
    Join Date
    Oct 2012
    Posts
    180
    Thanks
    22
    Thanked 1 Time in 1 Post

    Default How to strip extra tabs in my JS editor?

    Hi!

    I need a code that will allow only 5 tabs in a row and all other consecutive tabs after that should be stripped.

    This is a sample code from the JS editor:

    Code:
    text = text.replace(/^[ \t]+$/mg,"");
    I hope it makes sense. Thank you.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Something like this should work

    Code:
    text = text.replace(/\t{5}/m, "");

  3. The Following User Says Thank You to Nile For This Useful Post:

    qwikad.com (12-31-2012)

  4. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    In an effort to keep things organized, you have the option to set a thread to resolved when an issue is fixed. To make the status of the thread resolved:
    1. Go to your first post
    2. Edit your first post
    3. Click "Go Advanced"
    4. In the dropdown next to the title, select "RESOLVED"

Similar Threads

  1. AJAX Tabs - How to make an extra link to another internal div (content) ?
    By TheSailor in forum Dynamic Drive scripts help
    Replies: 11
    Last Post: 06-16-2010, 11:07 PM
  2. CARTOON STRIP...need help!!
    By sushi2hot4u in forum Java
    Replies: 0
    Last Post: 03-17-2008, 08:55 AM
  3. Adding Extra Tabs?
    By phil519 in forum CSS
    Replies: 1
    Last Post: 12-12-2007, 11:40 PM
  4. Navigation Strip (Tabs)
    By Liammm in forum Looking for such a script or service
    Replies: 2
    Last Post: 10-04-2007, 07:23 AM
  5. Strip Characters
    By NXArmada in forum PHP
    Replies: 20
    Last Post: 04-28-2006, 03:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •