[AccessD] right clean after a specific character

Stuart McLachlan stuart at lexacorp.com.pg
Sat Dec 31 03:24:03 CST 2022


You are better off parsing things like that based on the content rather than hard coded 
positions. Something like this:

Function MTitle(strHTML as string) As String
Dim strHTML As String
Dim lngStart As Long, lngEnd As Long
lngStart = InStr(strHTML, "</td><td><b>") + 12
lngEnd = InStr(lngStart, strHTML, "</b>")
MTitle = Mid$(strHTML, lngStart, lngEnd - lngStart)
End Function

On 31 Dec 2022 at 9:25, kost36 at gmail.com wrote:

> HI all,
> In a field there are strings like
> <table cellpadding="8"><tbody><tr><td><img
> src="./images/posters/1334.jpg" width= "80"
> height="130"></td><td><b>Movie title</b><br><b>.....some other
> characters What I need is to get only the movie title I use
> Mid$([title];113 for the left side but how to clean all the right
> characters after the movie title? Thank's I wish a Happy New Year to
> all of you from Chania, Crete, Greece /kostas konstantinidis
> 
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list