简体   繁体   English

崇高文字-搜索和替换

[英]Sublime Text - Search and Replace

In the code above how can I search for editEntidadeXXX on the name attribute and then insert this value on the id attribute? 在上面的代码中,如何在name属性上搜索editEntidadeXXX ,然后在id属性上插入此值?

Something like editEntidade(\\w)+ will found the names but it is possible to insert that values on the edit attribute? 可以找到诸如editEntidade(\\w)+之类的名称,但是可以在edit属性中插入这些值吗?

<div class="control-group column-group horizontal-gutters">
    <label class="large-15 small-100 content-right" for="editEntidadeRua">Rua</label> 
    <div class="control large-40 medium-40 small-100">
        <input type="text" id="editEntidade" name="editEntidadeRua" value="<?php echo html_escape($entidadeValues['rua']) ?>">
    </div>
</div>
<div class="control-group column-group horizontal-gutters">
    <label class="large-15 small-100 content-right" for="editEntidadeCodpostal">Código Postal</label> 
    <div class="control large-10 medium-10 small-100">
        <input type="text" id="editEntidade" name="editEntidadeCodpostal" value="<?php echo html_escape($entidadeValues['codpostal']) ?>">
    </div>
</div>

Find What: 找什么:

id="editEntidade"(\s+)name="editEntidade(\w+)"

Replace With: 用。。。来代替:

id="editEntidade$2" name="editEntidade$2"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM