substr

    35熱度

    10回答

    我有各種不同的HTML字符串可以將100個字符(剝離的內容,而不是原始的)切割成無需剝離標籤且不會破壞HTML的HTML字符串。 原始的HTML字符串(288字): $content = "<div>With a <span class='spanClass'>span over here</span> and a <div class='divClass'>nested div over <d

    8熱度

    3回答

    我想從表格的字符串列中提取單詞。 description =========================== abc order_id: 2 xxxx yyy aa mmm order_id: 3 nn kk yw 預期的結果集 order_id =========================== 2 3 表將至多有100行,文本長度爲〜256炭和柱總是具有一個orde

    0熱度

    1回答

    fff.html是它的一些與電子郵件地址的電子郵件有HREF mailto鏈接和一些不這樣做,我想他們刮他們,並輸出到以下格式 [email protected],[email protected],[email protected] 我有一個簡單的刮刀來獲取在HREF鏈接,但東西的人是奇怪的 <?php $url = "fff.html"; $raw = file_get

    3熱度

    9回答

    如何從特定數字中獲得價值? 可以說編號是20040819。我想獲得最後兩位數字,即使用Perl的19。

    2熱度

    4回答

    我有像「folder1/file1.txt」或「foldername1/hello.txt」字符串,我需要採用字符串標識文件夾名稱與斜槓(/)包括 (例如:從「folder1/file1.txt」我需要「folder1 /」)。 文件夾名稱並非全部具有相同的長度。 我該怎麼做C?感謝

    1熱度

    4回答

    有號碼'2352362361',因爲它由3個字符的末尾的空格分隔? 輸出應該獲得'2 352 362 361'

    1熱度

    1回答

    子串這是輸入文件的一行: FOO BAR 0.40 0.20 0.40 0.50 0.60 0.80 0.50 0.50 0.50 -43.00 100010101101110101000111010 以及檢查的特定位置的命令AWK如果它是一個「1」或「0」在塔13 是這樣的: awk -v values="${values}" '{if (substr($13,1,1)==1) printf v

    2熱度

    2回答

    $("a.newslinks").each(function(){ if ($(this).text().length > 38) { $(this).text().substr(35); //does not work $(this).append('...'); //works $(this).css({ "color" : "#ff00c

    7熱度

    5回答

    這裏是不是爲我工作: <?php $string = 'I have a dog and his name is <a href="http://www.jackismydog.com">Jack</a> and I love him very much because he\'s my favorite dog in the whole wide world and nothing could

    1熱度

    3回答

    我有一個類似sample.txt.pgp的字符串,我想在shell腳本中返回sample.txt(但是,字符串長度會有所不同,因此基本上是「.pgp」之前的所有字符)。是否有一個substr函數?就像,如果我做substr('sample.txt.pgp', -4, 0),它應該返回sample.txt?現在它不是,所以我想知道如果我的語法錯了,或者substr不是函數?