LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Extraction

Thanks Mike,

 

Your second reply is correct.

I have taken the out from After string and now its working fine.

 

THnaks again.

 

Suneel

0 Kudos
Message 11 of 13
(647 Views)

"RayR (aka JoeLabView)" <x@no.email> wrote in message
news:1234449610628-851957@exchange.ni.com...
> Hi Wiebe,&nbsp;I would have suggested the same thing, except that there
seems to be an additional requirement which is to handle names that do not
have the same type of extension or no extension at all...&nbsp; Unless I
misread the post after Mike provided an example solution..&nbsp;R

suneelkv isn't clear about it. If there is no same type of extension at all,
then there simply is no way to automate this process (unless you'd use a
list of acceptable names). If there is always a point, or a point followed
by numbers, I'd use the Search and Replace String. Use it in regular
expression mode, with "\.[0-9]*\s?" as expression. Use a \t as replacement,
and set it to replace all matches. The resulting string has all the ".",
".123", and ".555 " replaced. Much easier that using a match pattern in a
while loop. Probably more efficient as well. Then use a spreadsheet string
to array...

Regards,

Wiebe.



0 Kudos
Message 12 of 13
(636 Views)

MikeS81 wrote:

 If there is also a name at the end of your input string, then you have to add in this case the "after .." string to the array.


Are you sure that will work?  That's what I fixed in the example I provided.  If you simply wire for string after match, it will not append it to the end of the array, even if you put it in the True case, because the boolean is still False at that point.  And in the next round when the boolean is true, the string after match will be empty.

 

Suneel, did you even bother to look at the example I posted?

 

R

Message Edited by RayR (aka JoeLabView) on 02-12-2009 11:21 AM
0 Kudos
Message 13 of 13
(636 Views)