regex - regexp all non-empty sequence of non-whitespace characters exept comma -


how split line list using regexp(all non-empty sequence of non-whitespace characters exept comma). have try:

set list_  [regexp -inline -all {\s+\[,]} $line] 

but doesn't work.

so example: such lines:

name name2  x,y x,y x,y x,y   

x, y floating-point numbers

result should be:

name name2  x y x y x y x y 

if want use regexp , -inline, can use:

% set list_ [regexp -inline -all -- {[^\s,]+} $line] name name2  x y x y x y x y 

[^\s,]+ matches non-space characters , non-commas.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -