Trim leading whitespace
Tue, 03/27/2012 - 10:45 am
" !]L1lU22ut@#% T*)rM! 8" becomes "!]L1lU22ut@#% T*)rM! 8"
where the leading and internal whitespace can be any form of whitespace (blank, tab, etc.). I don't think that Igor has a trim function to remove leading or trailing characters. Is this correct? I am no regular Regular Expression person, but (through trial and error) I arrived at the following, using split string:
splitstring /E="(\\s*)([[:ascii:]]*)" sString, sFirst, sSecond
where sSecond returns the desired portion of the input string. Is this a reasonable solution to the problem or is there a better way?
Also, ideally, trailing whitespace would be removed as well, but I haven't figured that out using Regular Expressions.