logo
  • 教程列表
  • SO官方文檔
  • 內建變數和函式
    • 確定使用者空閒時間
    • 自動插入當前工作日名稱
    • 使用 RegEx 提取字串部分
    • 裁剪一個字串
  1. StackOverflow 文件
  2. AutoHotkey 教程
  3. 內建變數和函式
  4. 使用 RegEx 提取字串部分

使用 RegEx 提取字串部分

Created: November-22, 2018

myDebt := 9000
index  := RegExMatch("You owe me $42", "\$(\d+)", dollars)
if(index > 0) { ; indices are usually 1-based in AHK
    myDebt += dollars1
    MsgBox, Current debt: %myDebt%
}

結果:

目前的債務:9042

  • 裁剪一個字串
  • 自動插入當前工作日名稱

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明