(SOLVED) FilterString in LUA

Hey!
Is there something like "filterstring"? I want to filter string value by something..
For example, I have:
string = C:\myFolder\mySubFolder\myFile
I want to filter it by "\" to get
string[1] = C:
string[2] = myFolder
string[3] = mySubFolder
string[4] = myFile
In case when I need just to replace one to another I can use string.gsub(string, "initial", "new") all will works fine, but if I will need to add to the path or rearrange it I need to get it filtered.
Thanks!
Is there something like "filterstring"? I want to filter string value by something..
For example, I have:
string = C:\myFolder\mySubFolder\myFile
I want to filter it by "\" to get
string[1] = C:
string[2] = myFolder
string[3] = mySubFolder
string[4] = myFile
In case when I need just to replace one to another I can use string.gsub(string, "initial", "new") all will works fine, but if I will need to add to the path or rearrange it I need to get it filtered.
Thanks!