我想出了以下
<body>
<div class="flex">
<div>orange box and aqua box need to take up one row together</div>
<div>Hellothis is a long test sentence this is a long test sentence this is a long test sentence this is a long test is a long test sentence this is a long test sentence this is a long test sentence this is a long test</div>
<div>Hello 2this is a long test sentence this is a</div>
<div class="hi">Get me closer to Mr. Orange</div>
</div>
</body>
我还要删除以数字或 - 开头的电子邮件。删除我的意思是只选择地址而不是删除整个匹配。
有办法吗?
答案 0 :(得分:0)
^(?:\d+|-+)?([\w.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})$
这应该可以解决问题。它会捕获电子邮件,但也会过滤掉以数字或-
字符开头的电子邮件,并从中提取电子邮件。