Use GetBetween to Parse a String Between Two Strings

Use GetBetween to Parse a String Between Two Strings

This tips shows how to use GetBetween to parse and extract a string between two strings. GetBetween returns the extracted string, if found.

Public Function GetBetween(ByRef sSearch As String, ByRef sStart As String, ByRef sStop As String, _                                                    Optional ByRef lSearch As Long = 1) As String    lSearch = InStr(lSearch, sSearch, sStart)    If lSearch > 0 Then        lSearch = lSearch + Len(sStart)        Dim lTemp As Long        lTemp = InStr(lSearch, sSearch, sStop)        If lTemp > lSearch Then            GetBetween = Mid$(sSearch, lSearch, lTemp - lSearch)        End If    End IfEnd Function
Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular