Re: [問題] 抓取字串遇到"的問題
※ 引述《BRN ( )》之銘言:
: 不好意思 想請教一下
: 我有一串字串
: ret1=<form action="http://www.xxxx.xxxx:xx/apt_news/login.asp?act=login"
這是在html裡嗎
無論是jsp或java
字串都是" www.google.com "
長這樣的東西
: method="post" name="form1">
: 我想抓到黃色部分的字串
: 我程式碼寫成
: transurl=ret1.substring(
: ret1.indexOf("=",
: ret1.indexOf("action")) + 2,
: ret1.indexOf("\"",
: ret1.indexOf("\"",
: ret1.indexOf("action")))
: );
: 他會抓不到 想請教一下 我哪裡寫錯了.
: 謝謝各位
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.30.246
推
11/11 14:17, , 1F
11/11 14:17, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):