i have a question about capturing data using this for...I got a file with lines:
Code: Select all
# <- ignore this line
# # is for comment
Hex string with 32 length=blabla
Hex string with 32 length=blabla
Hex string with 32 length=blabla
Hex string with 32 length=blabla
Hex string with 32 length=blabla
Hex string with 32 length=blabla
Hex string with 32 length=blabla
Hex string with 32 length=blabla
Hex string with 32 length=blabla
when im using:
Code: Select all
for hex, comment in string.gfind(filestr, "([^\r\n#=]%x+)=([^#=]+)") do
... smth
print hex
print comment
end
Code: Select all
hex: some hex <- matched
comment: blabla
some hex <- why here ?
hex: some hex <- matched
comment: blabla
some hex <- why here ?
hex: some hex <- matched
comment: blabla
some hex <- why here ?
hex: some hex <- matched
comment: blabla
some hex <- why here ?
hex: some hex <- matched