LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

regular expression help

Well its been a time since I used Expect, so need help with regular
expressions. I need to get the bootloader version from following, what do I
use for the regular expression.



RF Board Version : 255

Bootloader = boot1.1.0.1.abf


SW Bank Information
-------------------
Current is bank 0
*
Bank 0 description: CMBUILD_1.1.02.02_RU_V1.5

Bank 1 description: CMBUILD_1.1.02.02_RU_V1.5
0 Kudos
Message 1 of 3
(2,767 Views)
I would use a two step process.

First use Match Pattern to look for the string:

Bootloader\s=\s

Make sure that you have enabled slash codes in the regular expression string constant so you can see the spaces.

Next do a search on the string after the match for the expression:

[\r\n]+

This will match any number of carriage returns or line feeds. The string before the match should be what you are looking for.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(2,767 Views)
Thanks Mike, that's what I had done, using the match pattern VI twice.

vishi

"mikeporter" wrote in message
news:506500000005000000ABE90000-1042324653000@exchange.ni.com...
> I would use a two step process.
>
> First use Match Pattern to look for the string:
>
> Bootloader\s=\s
>
> Make sure that you have enabled slash codes in the regular expression
> string constant so you can see the spaces.
>
> Next do a search on the string after the match for the expression:
>
> [\r\n]+
>
> This will match any number of carriage returns or line feeds. The
> string before the match should be what you are looking for.
>
> Mike...
0 Kudos
Message 3 of 3
(2,767 Views)