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.
我有 html 格式的字符串。我的正则表达式模式是
en-media[^>] hash='4854-621-780'[^>]
我想将模式替换为
img src='mnt/sdcard/img1'
如何在 html 字符串中替换它 android.
任何帮助将不胜感激。谢谢:)
就像@hack_on 说的我不确定你想用什么替换模式,但是这样的工作是否可行:
String dst = src.replaceAll("en-media[^>]hash='4854-621-780'[^>]", aReplacementString);