• Notpad替换


    1、查找数组变量

    原始串 
    str[1]abc[991]; 
    str[2]abc[992]; 
    str[11]abc[993]; 
    str[22]abc[994]; 
    str[111]abc[995]; 
    str[222]abc[996]; 
    str[1111]abc[997]; 
    str[2222]abc[999]; 

    目标串: 
    abc[1]; 
    abc[2]; 
    abc[11]; 
    abc[22]; 
    abc[111]; 
    abc[222]; 
    abc[1111]; 
    abc[2222]; 

    str

    ([09]+)" role="presentation" style="text-align: center; position: relative;">([09]+)
    abc
    ([09]+)" role="presentation" style="text-align: center; position: relative;">([09]+)

    abc[\1]

    2、将C形式数组变量转换成matlab形式变量

    原始串 
    abc[1]; 
    abc[2]; 
    abc[11]; 
    abc[22]; 
    abc[111]; 
    abc[222]; 
    abc[1111]; 
    abc[2222]; 

    目标串: 
    abc(1); 
    abc(2); 
    abc(11); 
    abc(22); 
    abc(111); 
    abc(222); 
    abc(1111); 
    abc(2222); 

    abc

    ([09]+)" role="presentation" style="text-align: center; position: relative;">([09]+)

    abc\1" role="presentation" style="position: relative;">\1

    3、在matlab形式格式下,将下标索引加1

    原字符串
    parms(1)
    parms(2)
    parms(3)
    parms(4)
    替换后字符串
    parms(1+1)
    parms(2+1)
    parms(3+1)
    parms(4+1)

    parms([09]+)" role="presentation" style="position: relative;">([09]+)

    parms(\1)+1" role="presentation" style="position: relative;">(\1)+1

    1. 1、查找数组变量
    2. 原始串 
    3. str[1]abc[991]
    4. str[2]abc[992]
    5. str[11]abc[993]
    6. str[22]abc[994]
    7. str[111]abc[995]
    8. str[222]abc[996]
    9. str[1111]abc[997]
    10. str[2222]abc[999]
    11. 目标串: 
    12. abc[1]
    13. abc[2]
    14. abc[11]
    15. abc[22]
    16. abc[111]
    17. abc[222]
    18. abc[1111]
    19. abc[2222]
    20. str\[([0-9]+)\]abc\[([0-9]+)\]
    21. abc[\1]
    22. 2、将C形式数组变量转换成matlab形式变量
    23. 原始串 
    24. abc[1]
    25. abc[2]
    26. abc[11]
    27. abc[22]
    28. abc[111]
    29. abc[222]
    30. abc[1111]
    31. abc[2222]
    32. 目标串: 
    33. abc(1); 
    34. abc(2); 
    35. abc(11); 
    36. abc(22); 
    37. abc(111); 
    38. abc(222); 
    39. abc(1111); 
    40. abc(2222); 
    41. abc\[([0-9]+)\]
    42. abc\(\1\)
    43. 3、在matlab形式格式下,将下标索引加1
    44. 原字符串
    45. parms(1)
    46. parms(2)
    47. parms(3)
    48. parms(4)
    49. 替换后字符串
    50. parms(1+1)
    51. parms(2+1)
    52. parms(3+1)
    53. parms(4+1)
    54. parms\(([0-9]+)\)
    55. parms\((\1)+1\)

  • 相关阅读:
    虚拟机Linux系统服务器环境搭建
    自定义类型:结构体,枚举,联合的学习
    Java Heap Space: Understanding and Resolving Memory Issues
    portswigger 目录遍历&文件上传
    【Rust日报】2022-12-04 比较 u64 与比较字符串的性能
    开源软件的漏洞响应:应对安全威胁
    vue 编程式导航
    ClickHouse 学习之从高级到监控以及备份(二)
    XSS 攻击是什么?
    [附源码]计算机毕业设计springboot个人博客系统
  • 原文地址:https://blog.csdn.net/andrewhxc/article/details/125886337