Jump to content

StringRight Problem


Recommended Posts

Can't seem to figure out what I'm doing wrong. The $arr would have in it ...

Genre‎: ‎Hip hop‎; ‎G-funk
Released‎: ‎December 24, 1994
Producer(s)‎: ‎Sean Combs‎; ‎Chucky Thompson‎ ...
Recorded‎: ‎June 1994
 
I'm doing the loop because sometimes Genre and Released depending on where info comes from.
 
 
$1 = ClipGet()
$arr = StringSplit($1, @CRLF, 1)

For $i = 0 To $arr[0]
        If StringInStr($arr[$i], "Released‎", 2, 1) Then
1st       MsgBox(1, "", $arr[$i])
            $getYear = StringRight($arr[$1], 4)
2nd     MsgBox(1, "", $getYear)
            ExitLoop
        EndIf
    Next

 

In 1st MsgBox I get ... Released‎: ‎December 24, 1994

In 2nd MsgBox I get ... 4

I even tried StringTrimRight and I still get ... 4.

Link to comment
Share on other sites

$getYear = StringRight($arr[$1], 4)

Shouldn't this be:

$getYear = StringRight($arr[$i], 4)

 

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...