Splitstring question

Hello,

I'm trying to use splitstring to separate data that is exported from some test equipment. An example string is as follows

0.501 Voc [V] following the format; Value Name [units]

My issue is with the square brackets. Since split string uses square brackets to indicate the substring types, such as ([[:digit:]]+) I am finding it difficult to indicate that the brackets are actually part of the string. My code worked fine for their older software, which used parenthesis for the units, but simply changing ( to [ did not work, nor did any of my other attempts to specifically state that the open and close bracket are actually in the string.

Any advice would be greatly appreciated.

-Paul
As you have found, the '[' and ']' characters have a special meaning in regular expressions. What you will want to do is to escape these characters, such that they lose this special meaning. In most software this is done by preceding them with a backslash character, i.e.
"["      // this means 'start a character class'
"\["     // this means 'match the literal character ['


But Igor accepts escaped characters too, and parses them, so you need double up every backslash. So to properly escape a symbol you need to put e.g. \\[ in your regexp string.

This is explained pretty well in the documentation. Try DisplayHelpTopic "Backslash in Regular Expressions".
Thanks for the advice, using '\' to escape the special meaning is exactly what I was looking for. Also, thank you for the help topics reference, I'm learning alot more about string matching techniques which will prove useful in the future.

-Paul