我從API抓取一個Feed,在這裏我想獲取以[[,2。請幫我,我該怎麼做?如何獲取匹配語句的行?
0
A
回答
0
,我在PHP想出了正則表達式是:
$s = ',,[[,2thesecretoflife';
$r = preg_match('/^,,\\[\\[,2/', $s);
if ($r) {
echo 'works';
}
基本上,你必須仔細逃脫[
s到讓他們得到適當的解釋。我相信你使用的任何語言都是相似的。
相關問題
- 1. 在匹配整行時在select語句中獲取行號
- 2. 獲取匹配行
- 3. 匹配和捕獲多個RegEx語句
- 4. MySQL的詞匹配語句
- 5. 如何在Scala「匹配」語句中匹配類?
- 6. 如何匹配行尾的句子?
- 7. 獲取多少百分比語句匹配mysql
- 8. Java語句模式匹配
- 9. XSLT if語句不匹配
- 10. 匹配語句用條件
- 11. 安裝 - 匹配語句
- 12. SQL WHERE子句:根據值獲取所有行/只匹配行
- 13. 如何在同一個表的多行中獲取匹配的WHERE子句?
- 14. 如何獲取執行的select語句中的總行數?
- 15. 如果語句匹配多個值
- 16. 如果語句匹配顯示文本
- 17. Mysql匹配短語對句短語
- 18. 如何在語句觸發器中獲取語句影響的行數
- 19. 如何獲取mysql的「部分匹配」?
- 20. 如何從SQL中獲取匹配和不匹配的行加入
- 21. 如何獲取多行匹配並將其分配給散列?
- 22. SELECT語句獲取最新的行
- 23. PHP讀取文件匹配,如果語句
- 24. 如何獲取IF語句以讀取多行文本框?
- 25. 解讀我對mysql語句的匹配
- 26. 找到沒有IF語句的匹配?
- 27. 查找不匹配的SQL語句
- 28. LIKE語句匹配的T-SQL
- 29. Neo4j中的多個匹配語句
- 30. SELECT語句中匹配的REGEXP模式
你在用什麼語言? –
我使用php語言 – hydef