Jump to content

Counting occurances of a substring in a string


mblunk
 Share

Recommended Posts

$text = StringReplace("this is a line of text", " ", "-")
$numreplacements = @extended
MsgBox(0, "New string is", $text)
MsgBox(0, "The number of replacements done was", $numreplacements)

@Extended is your answer, you do not need to "change or replace" the actual info

8)

Oh, thanks. I thought there was probably something already built-in, and I thought I remembered seeing it before, but I couldn't find it after a few minutes of searching in the help so I posted here. Thanks again.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...