LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Parts of a string between two sets of characters.

Solved!
Go to solution

Those sequences look like vt-52 / vt-100 screen control and cursor addressing sequences. They all start with an ascii "escape" character (Hex 1b) followed by "["

 

See http://ascii-table.com/ansi-escape-sequences.php for example

 

Rod.

 

Edit: You should look to remove "esc" followed by "[" then  any sequence of digits and semi colon and a single letter (upper or lower case) 

 

I'm a bit rusty on regular expressions, but I know there will be experts reading this!

 

Message 11 of 21
(1,447 Views)

@Mancho00 wrote:

Strange.  It's perfectly clear to me.remove string.PNG


Hey, the problem makes a lot more sense now.  The left arrow doesn't show up in my browser either.  It was just there in my string control when I pasted.  Apparently I missed that first arrow since I did not have that.  Hence why I have the first Match Pattern looking for the [ as well.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 21
(1,443 Views)

I don't see the left arrows in the original post either, but do see them in Mancho's quote of the original post and Crossrulz's quote of Mancho's post.

 

(Different font being used that displays it in one and not the other?)

0 Kudos
Message 13 of 21
(1,434 Views)

I copied the post to an image rather than text, so it would be clear to all.  It's probably a browser difference.

 

Anyway.. I would go with

replace string.png

 

*edited for clarity*

Message 14 of 21
(1,428 Views)

sequences look like vt-52 / vt-100 screen control

 

Setting my time machine for 1972...

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 15 of 21
(1,427 Views)

 It's probably a browser difference.

Safari, Firefox and Chrome all show it the same here.

 Mac or Windows.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 16 of 21
(1,410 Views)

Windows 7 here.

Chrome shows it.

IE does not.

0 Kudos
Message 17 of 21
(1,404 Views)

A possible regex solution

using regex.png

Ben64

0 Kudos
Message 18 of 21
(1,386 Views)

Looks like I am going to go after removing the vt-52 / vt-100 commands.

 

The data after what I posted dropped the 2K before what I want to keep.

 

My new question is how do I enter multiple items I want gone or replaced in the search string?

0 Kudos
Message 19 of 21
(1,367 Views)
Solution
Accepted by topic author RedneckNerd

I'm not sure I'd look for each possible item.  Just change the regex to look for each command.  This looks for escape followed by bracket, number (optional ; and number), then alpha char.

 

replace string2.png

Message 20 of 21
(1,349 Views)