To count the number of semicolons in a GitHub repo given a URL in MATLAB, we first need to obtain the contents of the repo. This can be done using the websave
function in MATLAB. Once the contents are obtained, we can count the number of semicolons using regular expressions.
Here's a function that accomplishes this:
main.m538 chars18 lines
This function takes a URL as input and returns the number of semicolons in all .m files in the corresponding GitHub repo. Note that this function downloads the entire repo, so it may not be suitable for large repos. Also, it deletes all .m files in the repo, so use with caution.
gistlibby LogSnag