tj-kicad-lib/tools/stm32管脚定义正则表达式.md

806 B

STM34F401xB/xC 管脚定义

  • PIN_Number--> aaaaaPIN_Number
    查找: ^\S+\s\S+\s(\d+)\s\S+\s\S+
    替换: aaaaa$1
    
  • \n --> (空格)
    查找: \n
    替换: (空格)
    
  • aaaaa --> \n
    查找: aaaaa
    替换: \n
    
  • 首字是"-",删除整行
    查找: ^-.+\n
    替换: (空白)
    
  • "-","EVENTOUT","I/O","FT","," ,"I","O","B"-->(空格)
    查找: \s-(?=\s|\n)|EVENTOUT|I/O|FT\w*|\(\d+\)|,|\sI(?=\s)|\sO(?=\s)|\sS(?=\s)|\sB(?=\s)
    替换: (空格)
    
  • 行首数字后的空白--> ","
    查找: (?<=^\d+)\s+
    替换: ,
    
  • 空白==>"/"
    查找: \s+(?=\S)
    替换: /
    
  • 删除行末空白
    查找: \s+$
    替换: (空白)
    
  • 转成kicad库
    查找: &(\d+),(.*)$
    替换: X $2 $1 2300 $100 100 L 50 50 1 1 B