Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこのようなテキストを持っています
500 Robin Stuart zzzzzzz
2 つのタブに囲まれたテキスト Robin STuart を取得したいと考えています。誰かがこれの正規表現を手伝ってくれますか? 私は思いついた(^.*?)(\t)(^.*?)(\t)が、それはコンパイルされていない。
(^.*?)(\t)(^.*?)(\t)
試す
String s = "500\tRobin Stuart\tzzzzzzz"; s = s.replaceAll(".*\t(.+)\t.*", "$1"); System.out.println(s);