X
X
Xasthul2020-01-07 12:51:54
Regular Expressions
Xasthul, 2020-01-07 12:51:54

RegExMatch cannot find a number. What to do?

Good afternoon. I have a line "You earned $7500 for your work". I need that when the line "You earned" appears in my file , the program reads a number (in this example 7500, but it can be different) and adds it to the variable , and then displayed this variable with the sum in the window. My window always shows 0.

F3::
salary = 0
start:
FileRead, readed, %file%
if (readed contains Вы заработали){
  RegExMatch(readed, "заработали (.*)\$", SubPat)
  salary += SubPat1
  MsgBox, %salary%
  FileDelete, %file%
  FileAppend,, %file%
  goto, start
}
else{
  goto, start
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-01-10
@dimonchik2013

replace it with a number and then model it and
say what it says there, whether it is called back

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question