Regex to match start of line and end of line for quick find and replace

六眼飞鱼酱① 提交于 2019-12-11 16:46:32

问题


Hey guys I've got a whole lot of HTML to format with

myString + "<somehtml></somehtml>";

Need 2 regex things, one to replace all new lines with myString + " and one to replace all end of lines with ";

Just using MyEclipse, Find and replace with regex enabled. Could anyone help me out?


回答1:


Individual regular expression engines may vary, but generally speaking, '^' will match the beginning of a line and '$' will match the end of a line.



来源:https://stackoverflow.com/questions/10003908/regex-to-match-start-of-line-and-end-of-line-for-quick-find-and-replace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!