简体   繁体   English

如何在 JavaScript 中拆分具有多个分隔符的字符串?

[英]How do I split a string with multiple separators in JavaScript?

How do I split a string with multiple separators in JavaScript?如何在 JavaScript 中拆分具有多个分隔符的字符串?

I'm trying to split on both commas and spaces , but AFAIK JavaScript's split() function only supports one separator.我正在尝试拆分逗号空格,但 AFAIK JavaScript 的split() function 仅支持一个分隔符。

Pass in a regexp as the parameter:传入一个正则表达式作为参数:

js> "Hello awesome, world!".split(/[\s,]+/)
Hello,awesome,world!

Edited to add:编辑添加:

You can get the last element by selecting the length of the array minus 1:您可以通过选择数组的长度减去 1 来获取最后一个元素:

>>> bits = "Hello awesome, world!".split(/[\s,]+/)
["Hello", "awesome", "world!"]
>>> bit = bits[bits.length - 1]
"world!"

... and if the pattern doesn't match: ...如果模式不匹配:

>>> bits = "Hello awesome, world!".split(/foo/)
["Hello awesome, world!"]
>>> bits[bits.length - 1]
"Hello awesome, world!"

You can pass a regex into JavaScript's split() method.您可以将正则表达式传递给 JavaScript 的split()方法。 For example:例如:

"1,2 3".split(/,| /) 
["1", "2", "3"]

Or, if you want to allow multiple separators together to act as one only:或者,如果您想让多个分隔符一起作为一个分隔符:

"1, 2, , 3".split(/(?:,| )+/) 
["1", "2", "3"]

(You have to use the non-capturing (?:) parenthesis, because otherwise it gets spliced back into the result. Or you can be smart like Aaron and use a character class.) (您必须使用非捕获(?:)括号,否则它会被拼接回结果中。或者您可以像 Aaron 一样聪明并使用字符 class。)

Examples tested in Safari and Firefox.在 Safari 和 Firefox 中测试的示例。

Another simple but effective method is to use split + join repeatedly.另一种简单但有效的方法是重复使用 split + join。

"a=b,c:d".split('=').join(',').split(':').join(',').split(',')

Essentially doing a split followed by a join is like a global replace so this replaces each separator with a comma then once all are replaced it does a final split on comma本质上,先进行拆分,然后进行连接就像全局替换,所以这会用逗号替换每个分隔符,然后一旦全部替换,它会在逗号上进行最终拆分

The result of the above expression is:上述表达式的结果是:

['a', 'b', 'c', 'd']

Expanding on this you could also place it in a function:对此进行扩展,您还可以将其放在 function 中:

function splitMulti(str, tokens){
        var tempChar = tokens[0]; // We can use the first token as a temporary join character
        for(var i = 1; i < tokens.length; i++){
            str = str.split(tokens[i]).join(tempChar);
        }
        str = str.split(tempChar);
        return str;
}

Usage:用法:

splitMulti('a=b,c:d', ['=', ',', ':']) // ["a", "b", "c", "d"]

If you use this functionality a lot it might even be worth considering wrapping String.prototype.split for convenience (I think my function is fairly safe - the only consideration is the additional overhead of the conditionals (minor) and the fact that it lacks an implementation of the limit argument if an array is passed).如果您经常使用此功能,甚至可能值得考虑包装String.prototype.split为方便起见(我认为我的 function 相当安全 - 唯一需要考虑的是条件(次要)的额外开销以及它缺少如果传递了数组,则执行限制参数)。

Be sure to include the splitMulti function if using this approach to the below simply wraps it:).如果使用下面的这种方法简单地包装它,请务必包含splitMulti function :)。 Also worth noting that some people frown on extending built-ins (as many people do it wrong and conflicts can occur) so if in doubt speak to someone more senior before using this or ask on SO:)还值得注意的是,有些人不赞成扩展内置插件(因为很多人做错了并且可能发生冲突),所以如果有疑问,请在使用此插件之前与更资深的人交谈或询问 SO:)

    var splitOrig = String.prototype.split; // Maintain a reference to inbuilt fn
    String.prototype.split = function (){
        if(arguments[0].length > 0){
            if(Object.prototype.toString.call(arguments[0]) == "[object Array]" ) { // Check if our separator is an array
                return splitMulti(this, arguments[0]);  // Call splitMulti
            }
        }
        return splitOrig.apply(this, arguments); // Call original split maintaining context
    };

Usage:用法:

var a = "a=b,c:d";
    a.split(['=', ',', ':']); // ["a", "b", "c", "d"]

// Test to check that the built-in split still works (although our wrapper wouldn't work if it didn't as it depends on it :P)
        a.split('='); // ["a", "b,c:d"] 

Enjoy!享受!

Lets keep it simple: (add a "[ ]+" to your RegEx means "1 or more")让我们保持简单:(在您的 RegEx 中添加“[ ]+”表示“1 或更多”)

This means "+" and "{1,}" are the same.这意味着“+”和“{1,}”是相同的。

var words = text.split(/[ .:;?!~,`"&|()<>{}\[\]\r\n/\\]+/); // note ' and - are kept

Tricky method:棘手的方法:

var s = "dasdnk asd, (naks) :d skldma";
var a = s.replace('(',' ').replace(')',' ').replace(',',' ').split(' ');
console.log(a);//["dasdnk", "asd", "naks", ":d", "skldma"]

For those of you who want more customization in their splitting function, I wrote a recursive algorithm that splits a given string with a list of characters to split on.对于那些想要在拆分 function 时进行更多自定义的人,我编写了一个递归算法,该算法将给定的字符串拆分为要拆分的字符列表。 I wrote this before I saw the above post.我在看到上面的帖子之前写了这个。 I hope it helps some frustrated programmers.我希望它可以帮助一些沮丧的程序员。

splitString = function(string, splitters) {
    var list = [string];
    for(var i=0, len=splitters.length; i<len; i++) {
        traverseList(list, splitters[i], 0);
    }
    return flatten(list);
}

traverseList = function(list, splitter, index) {
    if(list[index]) {
        if((list.constructor !== String) && (list[index].constructor === String))
            (list[index] != list[index].split(splitter)) ? list[index] = list[index].split(splitter) : null;
        (list[index].constructor === Array) ? traverseList(list[index], splitter, 0) : null;
        (list.constructor === Array) ? traverseList(list, splitter, index+1) : null;    
    }
}

flatten = function(arr) {
    return arr.reduce(function(acc, val) {
        return acc.concat(val.constructor === Array ? flatten(val) : val);
    },[]);
}

var stringToSplit = "people and_other/things";
var splitList = [" ", "_", "/"];
splitString(stringToSplit, splitList);

Example above returns: ["people", "and", "other", "things"]上面的示例返回: ["people", "and", "other", "things"]

Note: flatten function was taken from Rosetta Code注意: flatten function 取自Rosetta Code

You could just lump all the characters you want to use as separators either singularly or collectively into a regular expression and pass them to the split function.您可以将所有要用作分隔符的字符单独或集中汇总到正则表达式中,然后将它们传递给拆分 function。 For instance you could write:例如你可以写:

console.log( "dasdnk asd, (naks) :d skldma".split(/[ \(,\)]+/) );

And the output will be: output 将是:

["dasdnk", "asd", "naks", ":d", "skldma"]

My refactor of @Brian answer我对@Brian 答案的重构

 var string = 'and this is some kind of information and another text and simple and some egample or red or text'; var separators = ['and', 'or']; function splitMulti(str, separators){ var tempChar = 't3mp'; //prevent short text separator in split down //split by regex eg \b(or|and)\b var re = new RegExp('\\b(' + separators.join('|') + ')\\b', "g"); str = str.replace(re, tempChar).split(tempChar); // trim & remove empty return str.map(el => el.trim()).filter(el => el.length > 0); } console.log(splitMulti(string, separators))

Hi for example if you have split and replace in String 07:05:45PM嗨,例如,如果您在字符串 07:05:45PM 中拆分和替换

var hour = time.replace("PM", "").split(":");

Result结果

[ '07', '05', '45' ]

Here is a new way to achieving same in ES6 :这是在ES6中实现相同目标的新方法:

 function SplitByString(source, splitBy) { var splitter = splitBy.split(''); splitter.push([source]); //Push initial value return splitter.reduceRight(function(accumulator, curValue) { var k = []; accumulator.forEach(v => k = [...k, ...v.split(curValue)]); return k; }); } var source = "abc,def#hijk*lmn,opq#rst*uvw,xyz"; var splitBy = ",*#"; console.log(SplitByString(source, splitBy));

Please note in this function:请注意此 function:

  • No Regex involved不涉及正则表达式
  • Returns splitted value in same order as it appears in source以与source中出现的顺序相同的顺序返回拆分值

Result of above code would be:上述代码的结果将是:

在此处输入图像描述

I will provide a classic implementation for a such function.我将为这样的 function 提供一个经典的实现。 The code works in almost all versions of JavaScript and is somehow optimum.该代码几乎适用于 JavaScript 的所有版本,并且在某种程度上是最佳的。

  • It doesn't uses regex, which is hard to maintain它不使用难以维护的正则表达式
  • It doesn't uses new features of JavaScript它不使用 JavaScript 的新功能
  • It doesn't uses multiple.split().join() invocation which require more computer memory它不使用需要更多计算机 memory 的 multiple.split().join() 调用

Just pure code:只是纯代码:

var text = "Create a function, that will return an array (of string), with the words inside the text";

println(getWords(text));

function getWords(text)
{
    let startWord = -1;
    let ar = [];

    for(let i = 0; i <= text.length; i++)
    {
        let c = i < text.length ? text[i] : " ";

        if (!isSeparator(c) && startWord < 0)
        {
            startWord = i;
        }

        if (isSeparator(c) && startWord >= 0)
        {
            let word = text.substring(startWord, i);
            ar.push(word);

            startWord = -1;
        }
    }

    return ar;
}

function isSeparator(c)
{
    var separators = [" ", "\t", "\n", "\r", ",", ";", ".", "!", "?", "(", ")"];
    return separators.includes(c);
}

You can see the code running in playground: https://codeguppy.com/code.html?IJI0E4OGnkyTZnoszAzf您可以看到在 Playground 中运行的代码: https://codeguppy.com/code.html?IJI0E4OGnkyTZnoszAzf

a = "a=b,c:d"

array = ['=',',',':'];

for(i=0; i< array.length; i++){ a= a.split(array[i]).join(); }

this will return the string without a special charecter.这将返回没有特殊字符的字符串。

Splitting URL by .com/ or .net/通过.com/.net/拆分 URL

url.split(/\.com\/|\.net\//)

Perhaps you should do some sort of string replace to turn one separator into the other separator so you then only have one separator to deal with in your split.也许您应该进行某种字符串替换以将一个分隔符转换为另一个分隔符,这样您就只有一个分隔符在您的拆分中处理。

Here are some cases that may help by using Regex:以下是一些使用正则表达式可能会有所帮助的案例:

  • \W to match any character else word character [a-zA-Z0-9_] . \W匹配任何字符,否则单词字符[a-zA-Z0-9_] Example:例子:
("Hello World,I-am code").split(/\W+/); // would return [ 'Hello', 'World', 'I', 'am', 'code' ]
  • \s+ to match One or more spaces \s+匹配一个或多个空格
  • \d to match a digit \d匹配一个数字
  • if you want to split by some characters only let us say , and - you can use str.split(/[,-]+/) ...etc如果你想用一些字符分割,只让我们说,并且-你可以使用str.split(/[,-]+/) ...等

I think it's easier if you specify what you wanna leave, instead of what you wanna remove.我认为如果您指定要留下的内容而不是要删除的内容会更容易。

As if you wanna have only English words, you can use something like this:好像你只想有英文单词,你可以使用这样的东西:

text.match(/[a-z'\-]+/gi);

Examples (run snippet):示例(运行片段):

 var R=[/[a-z'\-]+/gi,/[a-z'\-\s]+/gi]; var s=document.getElementById('s'); for(var i=0;i<R.length;i++) { var o=document.createElement('option'); o.innerText=R[i]+''; o.value=i; s.appendChild(o); } var t=document.getElementById('t'); var r=document.getElementById('r'); s.onchange=function() { r.innerHTML=''; var x=s.value; if((x>=0)&&(x<R.length)) x=t.value.match(R[x]); for(i=0;i<x.length;i++) { var li=document.createElement('li'); li.innerText=x[i]; r.appendChild(li); } }
 <textarea id="t" style="width:70%;height:12em">even, test; spider-man But saying o'er what I have said before: My child is yet a stranger in the world; She hath not seen the change of fourteen years, Let two more summers wither in their pride, Ere we may think her ripe to be a bride. —Shakespeare, William. The Tragedy of Romeo and Juliet</textarea> <p><select id="s"> <option selected>Select a regular expression</option> <:-- option value="1">/[a-z'\-]+/gi</option> <option value="2">/[a-z'\-\s]+/gi</option --> </select></p> <ol id="r" style="display;block:width;auto:border;1px inner:overflow;scroll:height;8em:max-height;10em;"></ol> </div>

I ran into this question wile looking for a replacement for the C# string.Split() function which splits a string using the characters in its argument.我在寻找 C# string.Split() function 的替代品时遇到了这个问题,它使用其参数中的字符拆分字符串。

In JavaScript you can do the same using map an reduce to iterate over the splitting characters and the intermediate values:在 JavaScript 中,您可以使用 map 执行相同操作,并使用 reduce 迭代拆分字符和中间值:

let splitters = [",", ":", ";"]; // or ",:;".split("");
let start= "a,b;c:d";
let values = splitters.reduce((old, c) => old.map(v => v.split(c)).flat(), [start]);
// values is ["a", "b", "c", "d"]

flat() is used to flatten the intermediate results so each iteration works on a list of strings without nested arrays. flat() 用于展平中间结果,因此每次迭代都在没有嵌套 arrays 的字符串列表上工作。 Each iteration applies split to all of the values in old and then returns the list of intermediate results to be split by the next value in splitters.每次迭代都将 split 应用于 old 中的所有值,然后返回中间结果列表,这些结果将被拆分器中的下一个值拆分。 reduce() is initialized with an array containing the initial string value. reduce() 使用包含初始字符串值的数组进行初始化。

I don't know the performance of RegEx, but here is another alternative for RegEx leverages native HashSet and works in O( max(str.length, delimeter.length) ) complexity instead:我不知道 RegEx 的性能,但这是 RegEx 利用本机 HashSet 并在 O( max(str.length, delimeter.length) ) 复杂度下工作的另一种选择:

var multiSplit = function(str,delimiter){
    if (!(delimiter instanceof Array))
        return str.split(delimiter);
    if (!delimiter || delimiter.length == 0)
        return [str];
    var hashSet = new Set(delimiter);
    if (hashSet.has(""))
        return str.split("");
    var lastIndex = 0;
    var result = [];
    for(var i = 0;i<str.length;i++){
        if (hashSet.has(str[i])){
            result.push(str.substring(lastIndex,i));
            lastIndex = i+1;
        }
    }
    result.push(str.substring(lastIndex));
    return result;
}

multiSplit('1,2,3.4.5.6 7 8 9',[',','.',' ']);
// Output: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]

multiSplit('1,2,3.4.5.6 7 8 9',' ');
// Output: ["1,2,3.4.5.6", "7", "8", "9"]

I find that one of the main reasons I need this is to split file paths on both / and \ .我发现我需要这个的主要原因之一是在/\上拆分文件路径。 It's a bit of a tricky regex so I'll post it here for reference:这有点棘手的正则表达式,所以我会在这里发布以供参考:

var splitFilePath = filePath.split(/[\/\\]/);

Starting from @stephen-sweriduk solution (that was the more interesting to me,): I have slightly modified it to make more generic and reusable:从@stephen-sweriduk 解决方案开始(这对我来说更有趣,):我稍微修改了它以使其更通用和可重用:

/**
 * Adapted from: http://stackoverflow.com/questions/650022/how-do-i-split-a-string-with-multiple-separators-in-javascript
*/
var StringUtils = {

  /**
   * Flatten a list of strings
   * http://rosettacode.org/wiki/Flatten_a_list
   */
  flatten : function(arr) {
    var self=this;
    return arr.reduce(function(acc, val) {
        return acc.concat(val.constructor === Array ? self.flatten(val) : val);
    },[]);
  },

  /**
   * Recursively Traverse a list and apply a function to each item
   * @param list array
   * @param expression Expression to use in func
   * @param func function of (item,expression) to apply expression to item
   *
   */
  traverseListFunc : function(list, expression, index, func) {
    var self=this;
    if(list[index]) {
        if((list.constructor !== String) && (list[index].constructor === String))
            (list[index] != func(list[index], expression)) ? list[index] = func(list[index], expression) : null;
        (list[index].constructor === Array) ? self.traverseListFunc(list[index], expression, 0, func) : null;
        (list.constructor === Array) ? self.traverseListFunc(list, expression, index+1, func) : null;
    }
  },

  /**
   * Recursively map function to string
   * @param string
   * @param expression Expression to apply to func
   * @param function of (item, expressions[i])
   */
  mapFuncToString : function(string, expressions, func) {
    var self=this;
    var list = [string];
    for(var i=0, len=expressions.length; i<len; i++) {
        self.traverseListFunc(list, expressions[i], 0, func);
    }
    return self.flatten(list);
  },

  /**
   * Split a string
   * @param splitters Array of characters to apply the split
   */
  splitString : function(string, splitters) {
    return this.mapFuncToString(string, splitters, function(item, expression) {
      return item.split(expression);
    })
  },

}

and then接着

var stringToSplit = "people and_other/things";
var splitList = [" ", "_", "/"];
var splittedString=StringUtils.splitString(stringToSplit, splitList);
console.log(splitList, stringToSplit, splittedString);

that gives back as the original:以原始形式返回:

[ ' ', '_', '/' ] 'people and_other/things' [ 'people', 'and', 'other', 'things' ]

An easy way to do this is to process each character of the string with each delimiter and build an array of the splits:一个简单的方法是使用每个分隔符处理字符串的每个字符并构建一个拆分数组:

splix = function ()
{
  u = [].slice.call(arguments); v = u.slice(1); u = u[0]; w = [u]; x = 0;

  for (i = 0; i < u.length; ++i)
  {
    for (j = 0; j < v.length; ++j)
    {
      if (u.slice(i, i + v[j].length) == v[j])
      {
        y = w[x].split(v[j]); w[x] = y[0]; w[++x] = y[1];
      };
    };
  };
  
  return w;
};

 console.logg = function () { document.body.innerHTML += "<br>" + [].slice.call(arguments).join(); } splix = function() { u = [].slice.call(arguments); v = u.slice(1); u = u[0]; w = [u]; x = 0; console.logg("Processing: <code>" + JSON.stringify(w) + "</code>"); for (i = 0; i < u.length; ++i) { for (j = 0; j < v.length; ++j) { console.logg("Processing: <code>[\x22" + u.slice(i, i + v[j].length) + "\x22, \x22" + v[j] + "\x22]</code>"); if (u.slice(i, i + v[j].length) == v[j]) { y = w[x].split(v[j]); w[x] = y[0]; w[++x] = y[1]; console.logg("Currently processed: " + JSON.stringify(w) + "\n"); }; }; }; console.logg("Return: <code>" + JSON.stringify(w) + "</code>"); }; setTimeout(function() { console.clear(); splix("1.23--4", ".", "--"); }, 250);
 @import url("http://fonts.googleapis.com/css?family=Roboto"); body {font: 20px Roboto;}

Usage: splix(string, delimiters...)用法: splix(string, delimiters...)

Example: splix("1.23--4", ".", "--")示例: splix("1.23--4", ".", "--")

Returns: ["1", "23", "4"]返回: ["1", "23", "4"]

I solved this with reduce and filter.我通过减少和过滤解决了这个问题。 It might not be the most readable solution, or the fastest, and in real life I would probably use Aarons answere here , but it was fun to write.它可能不是最易读的解决方案,也不是最快的解决方案,在现实生活中我可能会在这里使用 Aarons answere ,但写起来很有趣。

[' ','_','-','.',',',':','@'].reduce(
(segs, sep) => segs.reduce(
(out, seg) => out.concat(seg.split(sep)), []), 
['E-mail Address: user@domain.com, Phone Number: +1-800-555-0011']
).filter(x => x)

Or as a function:或作为 function:

function msplit(str, seps) {
  return seps.reduce((segs, sep) => segs.reduce(
    (out, seg) => out.concat(seg.split(sep)), []
  ), [str]).filter(x => x);
}

This will output:这将 output:

['E','mail','Address','user','domain','com','0','Phone','Number','+1','800','555','0011']

Without the filter at the end you would get empty strings in the array where two different separators are next to each other.如果最后没有过滤器,您将在数组中获得空字符串,其中两个不同的分隔符彼此相邻。

Not the best way but works to Split with Multiple and Different seperators/delimiters不是最好的方法,但可以使用多个不同的分隔符/分隔符进行拆分

html html

<button onclick="myFunction()">Split with Multiple and Different seperators/delimiters</button>
<p id="demo"></p>

javascript javascript

<script>
function myFunction() {

var str = "How : are | you doing : today?";
var res = str.split(' | ');

var str2 = '';
var i;
for (i = 0; i < res.length; i++) { 
    str2 += res[i];

    if (i != res.length-1) {
      str2 += ",";
    }
}
var res2 = str2.split(' : ');

//you can add countless options (with or without space)

document.getElementById("demo").innerHTML = res2;
</script>

I'm suprised no one has suggested it yet, but my hack-ey (and crazy fast) solution was to just append several 'replace' calls before splitting by the same character.我很惊讶还没有人建议它,但我的hack-ey(和疯狂的快速)解决方案只是 append 几个“替换”调用,然后由相同的字符分割。

ie to remove a, b, c, d, and e:即删除a、b、c、d和e:

let str = 'afgbfgcfgdfgefg'
let array = str.replace('a','d').replace('b','d').replace('c','d').replace('e','d').split('d')

this can be conveniently generalized for an array of splitters as follows:这可以方便地概括为拆分器数组,如下所示:

function splitByMany( manyArgs, string ) {
  do {
    let arg = manyArgs.pop()
    string = string.replace(arg, manyArgs[0])
  } while (manyArgs.length > 2)
  return string.split(manyArgs[0])
}

So, in your case, you could then call所以,在你的情况下,你可以打电话

let array = splitByMany([" ", ","], 'My long string containing commas, and spaces, and more commas');

Check out my simple library on Github查看我在Github上的简单库

If you really do not want to visit or interact with the repo, here is the working code:如果你真的不想访问或与 repo 交互,这里是工作代码:

/**
 * 
 * @param {type} input The string input to be split
 * @param {type} includeTokensInOutput If true, the tokens are retained in the splitted output.
 * @param {type} tokens The tokens to be employed in splitting the original string.
 * @returns {Scanner}
 */
function Scanner(input, includeTokensInOutput, tokens) {
    this.input = input;
    this.includeTokensInOutput = includeTokensInOutput;
    this.tokens = tokens;
}

Scanner.prototype.scan = function () {
    var inp = this.input;

    var parse = [];
    this.tokens.sort(function (a, b) {
        return b.length - a.length; //ASC, For Descending order use: b - a
    });
    for (var i = 0; i < inp.length; i++) {


        for (var j = 0; j < this.tokens.length; j++) {

            var token = this.tokens[j];
            var len = token.length;
            if (len > 0 && i + len <= inp.length) {
                var portion = inp.substring(i, i + len);
                if (portion === token) {
                    if (i !== 0) {//avoid empty spaces
                        parse[parse.length] = inp.substring(0, i);
                    }
                    if (this.includeTokensInOutput) {
                        parse[parse.length] = token;
                    }
                    inp = inp.substring(i + len);
                    i = -1;
                    break;
                }

            }

        }

    }
    if (inp.length > 0) {
          parse[parse.length] = inp;
    }

    return parse;


};

The usage is very straightforward:用法非常简单:

    var tokens = new Scanner("ABC+DE-GHIJK+LMNOP", false , new Array('+','-')).scan();

console.log(tokens); 

Gives:给出:

['ABC', 'DE', 'GHIJK', 'LMNOP']

And if you wish to include the splitting tokens (+ and -) in the output, set the false to true and voila.如果您希望在 output 中包含拆分标记(+ and -) ,请将false设置为true ,然后瞧。 it still works.它仍然有效。

The usage would now be:现在的用法是:

var tokens = new Scanner("ABC+DE-GHIJK+LMNOP", true , new Array('+','-')).scan();

and

console.log(tokens);

would give:会给:

['ABC', '+', 'DE', '-', 'GHIJK', '+', 'LMNOP']

ENJOY!请享用!

I use regexp:我使用正则表达式:

str =  'Write a program that extracts from a given text all palindromes, e.g. "ABBA", "lamal", "exe".';

var strNew = str.match(/\w+/g);

// Output: ["Write", "a", "program", "that", "extracts", "from", "a", "given", "text", "all", "palindromes", "e", "g", "ABBA", "lamal", "exe"]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM