js截取两个字符串之间的内容:

    1. var str = “aaabbbcccdddeeefff”;
    2. str = str.match(/aaa(\S*)fff/)[1];
    3. alert(str);//结果bbbcccdddeee

    js截取某个字符串前面的内容:

    1. var str = “aaabbbcccdddeeefff”;
    2. tr = str.match(/(\S*)fff/)[1];
    3. alert(str);//结果aaabbbcccddd

    js截取某个字符串后面的内容:

    1. var str = “aaabbbcccdddeeefff”;
    2. str = str.match(/aaa(\S*)/)[1];
    3. alert(str);//结果bbbcccdddeeefff