I would start by isolating the alt=“…” string with splits 
(https://golang.org/pkg/strings/#Split) then use Sscanf 
(https://golang.org/pkg/fmt/#Sscanf) to parse the number. There may be 
other approaches like regular expressions.

Matt

On Wednesday, April 18, 2018 at 9:52:28 PM UTC-5, l vic wrote:
>
> I need to get "alt" value from html "img" tag:
>
> <body>
> ...
> <noscript>message</noscript>
>
> <img src="img4.png" alt="4" />
>
> <img src="img2.png" alt="2" />
>
> <img src="img3.png" alt="3" />
>
>
> </body>
>
> What would be the correct way in Go to read "alt" values into array?
>
> Thank you,
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to