zoukankan      html  css  js  c++  java
  • [总结]工作中常用的正则表达式,有了它事半功倍!

    1.给现有的DropDownList添加项目!

    例如:
    <asp:DropDownList id="ddlF1127" runat="server">
    </asp:DropDownList>

    文档中有如下信息

    1 Own Home Outright
    2 Buying Home
    3 Living with Relatives or Friends
    4 Leasing/Rent
    5 Departement housing
    6 Aboriginal housing

    那么用正则表达式
    {:z} {[a-zA-Z:Zs\/]+}

    <asp:ListItem Value =\1>\2</asp:ListItem>
    可以替换为
    <asp:DropDownList id="ddlF1127" runat="server">
                                
    <asp:ListItem Value="1">Own Home Outright </asp:ListItem>
                                
    <asp:ListItem Value="2">Buying Home </asp:ListItem>
                                
    <asp:ListItem Value="3">Living with Relatives or Friends</asp:ListItem>
                                
    <asp:ListItem Value="4">Leasing/Rent</asp:ListItem>
                                
    <asp:ListItem Value="5">Departement housing</asp:ListItem>
                                
    <asp:ListItem Value="6">Aboriginal housing</asp:ListItem>
                            
    </asp:DropDownList>
  • 相关阅读:
    Study Plan The Twelfth Day
    Study Plan The Fifteenth Day
    Study Plan The Seventeenth Day
    Study Plan The Tenth Day
    Study Plan The Eighth Day
    Study Plan The Eleventh Day
    Study Plan The Sixteenth Day
    Study Plan The Thirteenth Day
    Study Plan The Fourteenth Day
    Study Plan The Ninth Day
  • 原文地址:https://www.cnblogs.com/goody9807/p/263277.html
Copyright © 2011-2022 走看看