LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Match all characters excluding ones "inside the double quote"


@thols wrote:

\!\$abCD will work.

 

I usually use https://regex101.com to test regexes. It gives direct and clear feedback.


I like using https://rubular.com/ for RegEx testing.

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 11 of 18
(2,080 Views)

Thank you for your idea but in your case, if I don't have the "Plus" + as the format of the expression, nothing can be matched. + ... + is just my example. I would like to match all strings (with some special characters I mentioned above) excluding the strings "inside the double quote"

0 Kudos
Message 12 of 18
(2,060 Views)

@anhduy92 wrote:

Thank you for your idea but in your case, if I don't have the "Plus" + as the format of the expression, nothing can be matched. + ... + is just my example. I would like to match all strings (with some special characters I mentioned above) excluding the strings "inside the double quote"


Well, here's one way to get everything except what is inside quotes:

thols_0-1585547700850.png

 

It's just what I came up with now but I'm sure there's a simpler way.

 

Certified LabVIEW Architect
0 Kudos
Message 13 of 18
(2,055 Views)

@thols wrote:

Well, here's one way to get everything except what is inside quotes:

thols_0-1585547700850.png

 

It's just what I came up with now but I'm sure there's a simpler way.

 


I don't know if it's been improved, but that solution is very slow if the string gets big (it bit me in a project as i started on this job). It's better to send the 'index found' to the shift register and use it for 'start at index'. That way no string needs to be reallocated. 🙂 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 14 of 18
(2,051 Views)

I did a test, the difference isn't very big nowadays, using index is some 10-20% faster and more consistant, but not a huge thing. 🙂

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 15 of 18
(2,046 Views)

@Yamaeda wrote:...

I don't know if it's been improved, but that solution is very slow if the string gets big (it bit me in a project as i started on this job). It's better to send the 'index found' to the shift register and use it for 'start at index'. That way no string needs to be reallocated. 🙂 

/Y


Of course, how sloppy of me:

thols_0-1585557217307.png

 

Certified LabVIEW Architect
Message 16 of 18
(2,040 Views)

@thols wrote:

@Yamaeda wrote:...

I don't know if it's been improved, but that solution is very slow if the string gets big (it bit me in a project as i started on this job). It's better to send the 'index found' to the shift register and use it for 'start at index'. That way no string needs to be reallocated. 🙂 

/Y


Of course, how sloppy of me:

thols_0-1585557217307.png

 


Shouldn't that shift register be initialized?

Spoiler
It should.
0 Kudos
Message 17 of 18
(2,033 Views)

I think this does the same:

Between quotes.png

 

Or, if you just want all quoted strings removed:

Between quotes 2.png

 

0 Kudos
Message 18 of 18
(2,030 Views)