Hello, all!
My problem is:
I have a string like "Title:zuiop:asddf:asdf:dd".
I wanted to regexp it so, that [tt]"Title"[/tt] and the rest of the string were put into two separate variables.
BUT the point is : regexp always tries to select the largest possible range from the string. Here is my regexp:
[tt]
set temp "Title:zuiop:asddf:asdf:dd"
regexp {^(.*)\.*)$} $temp all v1 v2
[/tt]
It divides into "Title:zuiop:asddf:asdf" and "dd" and not [tt]Title[/tt] and [tt]zuiop:asddf:asdf:dd[/tt]!!!
This one doesn't work also :
[tt]regexp {^([^\:].*)\.*)$} $temp all v1 v2[/tt]
Any ideas? Thanks in advance
My problem is:
I have a string like "Title:zuiop:asddf:asdf:dd".
I wanted to regexp it so, that [tt]"Title"[/tt] and the rest of the string were put into two separate variables.
BUT the point is : regexp always tries to select the largest possible range from the string. Here is my regexp:
[tt]
set temp "Title:zuiop:asddf:asdf:dd"
regexp {^(.*)\.*)$} $temp all v1 v2
[/tt]
It divides into "Title:zuiop:asddf:asdf" and "dd" and not [tt]Title[/tt] and [tt]zuiop:asddf:asdf:dd[/tt]!!!
This one doesn't work also :
[tt]regexp {^([^\:].*)\.*)$} $temp all v1 v2[/tt]
Any ideas? Thanks in advance