Skip to content

Commit

Permalink
fixed: get year from file or folder name
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCooper committed Feb 1, 2016
1 parent 0815d2d commit 28d9a11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EmberAPI/clsAPIStringUtils.vb
Expand Up @@ -613,7 +613,7 @@ Public Class StringUtils
''' <remarks>The year can only be 4 digits from 1900 - 2099. More or less digits and the string won't be modified.</remarks>
Public Shared Function GetYear(ByVal sString As String) As String
If String.IsNullOrEmpty(sString) Then Return String.Empty
Dim strYear As String = Regex.Match(sString, "((19|20)\d{2})").Value
Dim strYear As String = Regex.Match(sString, "((19|20)\d{2})", RegexOptions.RightToLeft).Value
If Not String.IsNullOrEmpty(strYear) Then
Return strYear.Trim
End If
Expand Down

0 comments on commit 28d9a11

Please sign in to comment.