Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String parsing problem
#2
Macro Macro1703
Code:
Copy      Help
out
;str s="u:\myfile.txt u:\my file with space u:\myfolder u:\my folder with space"
str s="u:\myfile.txt u:\my file with space \\x\y\myfolder \\x\y\my folder with space"

ARRAY(str) a; int i
;if(!findrx(s "[a-z]:.+?(?= [a-z]:|$)" 0 1|4 a)) ret ;;simpler, does not work with \\x\y\...
if(!findrx(s "([a-z]:|\\\\).+?(?= ([a-z]:|\\\\)|$)" 0 1|4 a)) ret ;;supports \\x\y\...

for i 0 a.len
,out a[0 i]


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)