cancel
Showing results for 
Search instead for 
Did you mean: 

Mystery Whitespace

hoffmanroni
New Contributor III
Hi, wondering if someone can help me with this.  

I am pulling a string from some html 

" style="width: 193px; height: 19px; " >
Test</td>
"

if I parse this to get the value "Test" it ends  up looking like

"
Test"


if I cast to symbol it looks like

`
Test 

I've tried timming, and replacing, and other things but I can't seem to get rid of the preceeding whitespace

Thanks
2 REPLIES 2

eliot_robinson1
New Contributor
Hi Roni,

You can use the trim command with except to get rid of the whitespace:

q)s:"    \n    Test"
q
)`$trim s except "\n"
`
Test

Or you can use the .Q.id command:

q).Q.id `$s
`
Test

Hope this helps!

Ahh got it thanks