John Lokanis Posted September 15, 2010 Report Share Posted September 15, 2010 Before I go and reinvent another wheel, does anyone have a VI that will reverse a string but not esc'd chars in the string? For example, if my string is: find \[this\] text and I want to find it by searching from the end of my data first, I reverse it and the data before using match pattern. But the reverse is this: txet ]/siht[\ dnif what I need is this: txet \]siht\[ dnif because I need to preserve the esc'd special chars in the search string so match pattern works. thanks for any help! -John Quote Link to comment
John Lokanis Posted September 15, 2010 Author Report Share Posted September 15, 2010 Wheel invented: Let me know if you can improve on this. Quote Link to comment
ShaunR Posted September 15, 2010 Report Share Posted September 15, 2010 Wheel invented: Let me know if you can improve on this. upload it then Quote Link to comment
John Lokanis Posted September 15, 2010 Author Report Share Posted September 15, 2010 you can import the snippet into LabVIEW and run it. Quote Link to comment
ShaunR Posted September 15, 2010 Report Share Posted September 15, 2010 you can import the snippet into LabVIEW and run it. And how do I do that?. Quote Link to comment
MikaelH Posted September 15, 2010 Report Share Posted September 15, 2010 Drag the image to your block diagram, (if using 2010). Quote Link to comment
ShaunR Posted September 15, 2010 Report Share Posted September 15, 2010 (edited) Drag the image to your block diagram, (if using 2010). 2009. I just get a hyperlink. But I'm beyond caring now . Edited September 15, 2010 by ShaunR Quote Link to comment
Francois Normandin Posted September 15, 2010 Report Share Posted September 15, 2010 2009. I just get a hyperlink. But I'm beyond caring now . You need to save it to disk first, then drag on diagram. It works on LV2009 too. I think it has to do with Firefox (or maybe the way LAVA deals with pictures?) because I've dragged them directly to diagram before. Don't sure what has changed since I did that. Quote Link to comment
jgcode Posted September 15, 2010 Report Share Posted September 15, 2010 You need to save it to disk first, then drag on diagram. It works on LV2009 too. I think it has to do with Firefox (or maybe the way LAVA deals with pictures?) because I've dragged them directly to diagram before. Don't sure what has changed since I did that. Google's the same. I think IE is the only one to work directly? Quote Link to comment
ShaunR Posted September 15, 2010 Report Share Posted September 15, 2010 (edited) OK. so really we are just talking performance here. So with this as the seed. What's the execution time? Edited September 15, 2010 by ShaunR Quote Link to comment
ShaunR Posted September 15, 2010 Report Share Posted September 15, 2010 I think IE is the only one to work directly? Do people still use that? Quote Link to comment
jgcode Posted September 15, 2010 Report Share Posted September 15, 2010 Do people still use that? I hate it too (but am forced to use it occasionally). I'm a Google Chrome man, its so fast - esp download images on screen etc... I love it. Quote Link to comment
Mellroth Posted September 15, 2010 Report Share Posted September 15, 2010 Wheel invented: Let me know if you can improve on this. If it is all about performance, how about this; /J Quote Link to comment
Phillip Brooks Posted September 15, 2010 Report Share Posted September 15, 2010 I haven't played with regular expressions in a while, but maybe there is a way to do this with Match Regular Expression. Quote Link to comment
ShaunR Posted September 15, 2010 Report Share Posted September 15, 2010 If it is all about performance, how about this; /J Yup. that's my solution too. Except I just used the value d92 instead of a cast Quote Link to comment
Mellroth Posted September 15, 2010 Report Share Posted September 15, 2010 Yup. that's my solution too. Except I just used the value d92 instead of a cast Always nice to hear that others think the same For clarity I prefer to use the cast, and because of constant folding I believe that there will be no hit in performance. /J Quote Link to comment
ShaunR Posted September 15, 2010 Report Share Posted September 15, 2010 (edited) Always nice to hear that others think the same Indeed. It confirms my suspicion that I'm really not as stupid as I look For clarity I prefer to use the cast, and because of constant folding I believe that there will be no hit in performance. Can't argue with that. Readability over elegance (no performance hit). But in contrast to your previous statement. computers definitely don't think like me. Edited September 15, 2010 by ShaunR Quote Link to comment
John Lokanis Posted September 15, 2010 Author Report Share Posted September 15, 2010 thanks for the improvement ideas. I will give them a try. Perhaps this would make a good addition to the OpenG string functions? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.