Jump to content

Search and Replace Regular Expression


mal11

Recommended Posts

does anyone else find Search and Replace Pattern.vi useless?

It seems to me that you can't remove all the <HTML> tags from a string with it.

I substituted Match Regular Expression for Match Pattern, creating a

new VI called Search and Replace Regular Expression...

any thoughts as to why NI didn't do this already?

wouldn't it also be nice if there was a PCRE node where small Perl-like

scripts could be used?

mlewis

lv 8.0

Download File:post-3791-1160279637.vi

Link to post
does anyone else find Search and Replace Pattern.vi useless?

It seems to me that you can't remove all the <HTML> tags from a string with it.

I substituted Match Regular Expression for Match Pattern, creating a

new VI called Search and Replace Regular Expression...

To me it seems that Search and Replace Pattern.vi IS able to remove the tags, see attched example.

Can you post a specific example where it doesn't work? (Or maybe I misunderstood what you want to achieve?)

-Franz

Download File:post-833-1160287566.vi

Link to post
To me it seems that Search and Replace Pattern.vi IS able to remove the tags, see attched example.

Can you post a specific example where it doesn't work? (Or maybe I misunderstood what you want to achieve?)

-Franz

Download File:post-833-1160287566.vi

Your code does indeed work.

However, I'm reading the Details sections of the Match Pattern help page, and I don't understand

what the regex <[^>]*> means? I can't decipher it from the Match Pattern Details page.

On the other hand, I've used Perl alot in the past, so <.*?> is more natural for me.

mlewis

Link to post
Your code does indeed work.

However, I'm reading the Details sections of the Match Pattern help page, and I don't understand

what the regex <[^>]*> means? I can't decipher it from the Match Pattern Details page.

On the other hand, I've used Perl alot in the past, so <.*?> is more natural for me.

mlewis

The match pattern reads

< match of the '<' character

[^>]* any number of characters other than '>'

> match of the '>' character

/J

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.