# a94f299fa57d8c374cca1da0d766eb5a0213fed3caf4a59ae6040e265b826a61 Elan 1.6.1 guest default_profile valid

main
  let file be openFileForReading()
  variable text set to file.readWholeFile()
  variable textl set to text.length()
  variable s set to "<el-compl></el-compl><el-msg></el-msg>"
  variable sl set to s.length()
  variable j set to 0
  for i from 0 to textl - 1 step 1
    set j to i + sl
    if text[i..j] is s then
      set text to text[0..i] + text[(i + sl)..(textl - 1)]
      print "match at " + "{i}"
    end if
  end for
  variable r set to "<el-fr>[0..9]*</el-fr>".asRegExp()
  for i from 0 to textl - 1 step 1
    set j to i + sl
  end for
  let ofile be createFileForWriting("output.txt")
  call ofile.writeWholeFile(text)
end main
