My version of AutoHotKey is the 1.1.26.1 32 bits on Windows 10 64 bits, same problem in Windows 7 32 bits
Code: Select all
wCMD =
(
view @ XXXXX5579666847> show dsl stats
adsl: ADSL driver and PHY status
Status: Showtime
Number of Cuts: 0
Last Retrain Reason: 8000
Last initialization procedure status: 0
Max: Upstream rate = 752 Kbps, Downstream rate = 6020 Kbps
Bearer: 0, Upstream rate = 758 Kbps, Downstream rate = 5122 Kbps
Link Power State: L0
Mode: ADSL2+ Annex A
TPS-TC: ATM Mode(0x0)
Trellis: U:ON /D:ON
Line Status: No Defect
Training Status: Showtime
Down Up
SNR (dB): 9.2 9.4
Attn(dB): 53.5 35.9
Pwr(dBm): 19.3 12.4
ADSL2 framing
)
vPos := RegExMatch(wCMD, "Number of Cuts:.+" , SubPat)
If (vPos > 0)
MsgBox % SubPat
Second search: If I use "Bearer:.*", same problem, "Bearer:.*Kbps" works!.
Third search, I want to extract the SNR and Attn lines, I use the "SNR((.+)`n`r){2}" search that on another similar occasion worked for me, but not here. The search "SNR ((. +) \ R) {1}" also returns the line Pwr, and "SNR ((. +) \ R) {2}" also returns it.
I tried a string that I picked up from SNR, inclusive, telling him to stop Pwr, but I can not deny Pwr to remove it from the result. ej. "SNR.+Pwr"
Thank you in advance for the help you can give me and, excuse my bad English.