06-29-2006 03:45 PM
06-29-2006 03:55 PM
See attached. This will parse for the N[0-9]+ string (a N followed by a number of any length) and remone the N.
Paul
06-29-2006 04:01 PM
06-29-2006 04:15 PM
06-29-2006 04:22 PM
@Dennis Knutson wrote:
Can't you simply do a search for \sN and replace with \s?
06-29-2006 04:26 PM
Paul,
Thank you so much for the answer it works beautifully. You get 5 stars.
06-29-2006 04:47 PM
@jasonhill wrote:
@Dennis Knutson wrote:
Can't you simply do a search for \sN and replace with \s?
Well, there are N's that do not appear before a number. ".OPTIONS" and ".END" for example. I like Falkpl's solution.
06-29-2006 05:01 PM
Do you think we could get it to put them in order like this:
M1 3 10 14 1 CMOSP M=32 L=1.75U W=2.45U
M2 14 3 1 1 CMOSP M=64 L=7U W=3.5U
M3 10 10 1 1 CMOSP M=2 L=1.75U W=2.45U
Just seeing if it could be done.
06-30-2006 02:42 AM
06-30-2006 06:43 AM
Tokenizing and parsing text can be a difficult problem. When I was in graduate school I wrote a text compiler for a made-up language and computer architecture and got a greater appreciation for the topic. I wrtote the code in c++ but was able to use two awsome tools, FLEX and Bison. These were two tools writen in c which could take a set of rools for creating tokens (already avaliable in labview) and a grammar rule definition and parse a complex file. It would be nice to see this aspect of labview expanded where an express vi allowed you to defile token list and a grammar and parse and or edit files with automatic code generation. Unfortunatly I never get too much free time to follow-up on my ideas. Glad to here my solution worked.
Paul