string-split

    1熱度

    1回答

    public static void main(String[] args) { // TODO Auto-generated method stub String str="aaabbddaabbcc"; String[] str2=str.split(""); String pointer=str2[0]; int count=0;

    0熱度

    2回答

    當檢索從Gmail標籤AA名單分裂,他們回來作爲一個字符串,例如: \Inbox \Sent Important "Muy Importante" foo 如果有一個內置的.NET功能我想知道將其分爲「真」格式 - 即 ["\Inbox", "\Sent Important", "Muy Importante", "foo" ] 或者這是一個正則表達式嗎?

    0熱度

    1回答

    我的問題是,我有一個字符串,我想將它拆分成一個數組。例如: 我得到的字符串是 Unexpected Error: Check Availability of Data Source Failed: \\server01\z.storage\Folder\Folder\Folder\Folder\_Folder\Folder_3\Folder\Folder\File_Fi_3.expression

    3熱度

    5回答

    我使用String.split()來劃分一些字符串作爲IP地址,但其returning an empty array意,所以我固定使用String.substring我的問題(),但我不知道爲什麼沒有按預期工作,我的代碼是: // filtrarIPs("196.168.0.1 127.0.0.1 255.23.44.1 100.168.100.1 90.168.0.1","168"); pub

    -2熱度

    4回答

    我無法在Java中找到標準字符串函數來查找2個字符串中的匹配字母。 你知道如何使下面的代碼更小/使用一些標準功能重構呢? 我只作了簡單的功能:第一個字符串的每一個字母比較第二個字符串的每一個字母。 public static void compare_letters(String name1, String name2) { int equal_letters = 0 ; fo

    2熱度

    2回答

    我想在PHP中將一個字符串分成'名稱'部分(字符串)和'鍵'部分(整數數組)。 例輸入: $input = "Sum(1, 5, 7)"; 所需的輸出: $name = "Sum"; $keys = [1, 5, 7]; 我一直在尋找爆炸,str_split使preg_split,我敢肯定有很多可能的實現。什麼是最優雅的解決方案?

    0熱度

    2回答

    ,大家好我獲取數據從以下查詢 MySqlCommand cmd = new MySqlCommand("select concat(c1.countryname,' vs ',c2.countryname) as CountryACountryB,r.Description as Round,m.result,m.matchId from matches m left join countries

    1熱度

    3回答

    1997年9月,如此這般 我需要將上面的文字分成 September 1997 such and such 分隔符是1997年,也就是 /[0-9] [0-9] [0-9] [0-9] \,/ 如何通過正則表達式在ruby中執行此操作? 這是我的嘗試: 「1997年9月,這樣和 這種」 .to_s.split(/ \ s +(= [0-9] [0-9] [0-9] [? 0-9] \,)/)

    0熱度

    4回答

    我試圖將String作爲輸入,將其拆分爲空格字符以將單詞存儲在數組中,然後使用這些單詞與其他單詞進行比較。問題是我想在分裂期間被忽略,因爲他們被比較的詞將永遠不會包含句點。 例如: String testString = "This. is. a. test. string."; String[] test = testString.split(" "); for (int i = 0; i

    0熱度

    1回答

    在Linux bash中有很多關於IFS字符串拆分和單引號轉義的回答問題,但是我沒有發現任何加入這兩個主題的答案。在蹣跚問題我得到像一個在這裏下面的代碼的奇怪(我)行爲: (bash腳本塊) theString="a string with some 'single' quotes in it" old_IFS=$IFS IFS=\' read -a stringTokens <<< "$