LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Removing the Number and special characters from string


@Mrtechie wrote:

Hi gerdw , 

 

Just i need to eliminate the Numbers , special Characters  in the String . 

I need in this format 

  1. Storage Security Command driver 
  2. AHCI Bus Driver 
  3. SD Host controller Driver and so on ......,( in table or Listbox - UI ) 

 


Is this what you are looking for?  If so,... It almost works.

 

I noticed that the drivers in the list were separated by "N N" and I used that in the Search and Replace function. There are a few exceptions in the results. I needed to append "()" to the to account for lines that did not have any parenthesis. However, those lines ended up with some residual numbers/characters. It appears that it is an 8 digit hex followed by a space and another letter or question mark. It shouldn't be that difficult to remove.

 

Another exception I seen was "<null string> Fv".

 

EDIT: attached the vi (version 2014)

 

Driver Filter (rev1).png

 

fp.PNG

0 Kudos
Message 11 of 13
(858 Views)

@jamiva wrote:

@Mrtechie wrote:

Hi gerdw , 

 

Just i need to eliminate the Numbers , special Characters  in the String . 

I need in this format 

  1. Storage Security Command driver 
  2. AHCI Bus Driver 
  3. SD Host controller Driver and so on ......,( in table or Listbox - UI ) 

 


Is this what you are looking for?  If so,... It almost works.

 

I noticed that the drivers in the list were separated by "N N" and I used that in the Search and Replace function. There are a few exceptions in the results. I needed to append "()" to the to account for lines that did not have any parenthesis. However, those lines ended up with some residual numbers/characters. It appears that it is an 8 digit hex followed by a space and another letter or question mark. It shouldn't be that difficult to remove.

 

Another exception I seen was "<null string> Fv".

 

EDIT: attached the vi (version 2014)

 

Driver Filter (rev1).png

 

fp.PNG


"^[\s*[0-9]*]*(.*?)\\(" probably should be "^[\s0-9]*(.*?)\\(". The first matches (from the beginning) 0 or more whitespaces, *'s, ['s, numbers 0-9, then 0 or more ]'s.

 

It still works of course...

0 Kudos
Message 12 of 13
(849 Views)

Another question - is there any difference in these drivers?
Console Splitter Driver Fv...
Console Splitter Driver F9...
Console Splitter Driver FB...

 

If you want to reference only one of these instances in your list, then you can get rid if the Search and Replace and do it this way instead.

 

Driver Filter (rev2).png

 

fp.PNG

0 Kudos
Message 13 of 13
(842 Views)