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>
  • 相关阅读:
    20180130工作总结
    高并发情况利用锁机制处理缓存未命中
    Git学习(二)
    Git学习(一)
    Navicat运行sql文件报错out of memory
    Windows中杀死某个端口的进程
    Git入门基本操作
    MySQL数据库安装与配置详解
    用户模块开发
    数据库系列学习(三)-数据的增、删、改
  • 原文地址:https://www.cnblogs.com/goody9807/p/263277.html
Copyright © 2011-2022 走看看