#Open and read the downloaded file
transcript_html_name = files_in_dir[i]
File.open(Dir.pwd + "/Transcripts/#{transcript_html_name}", "r") do |f|
f.each_line do |line|
#Search for the Tax Period date to get the year
if line.include? "TAX PERIOD:"
line.gsub!(/(<[^>]*>)|\n|\t/s) {""}
line.slice!("TAX PERIOD:")
line.gsub!(/\w\w\w[.]\s\d\d[,]\s/) {""}
year = line
end
script.jpgline.gsub!(//\w{3,}[,]/) {""}
line.gsub!(/\w{3,}[,]/) {""}
ASKER
# Search for the Tax Period date to get the year
if line.include? "TAX PERIOD:"
line.gsub!(/(<[^>]*>)|\n|\t/s) {""}
line.slice!("TAX PERIOD:")
line.gsub!(/\w\w\w[.]\s\d\d[,]\s/) {""}
year = line
elsif line.include? "Tax Period or Periods:"
year = "0000"
end
ASKER
...
elsif line.include? "Tax Period or Periods:"
year = line[line.size-4, line.size-1]
end
...
elsif line.include? "Tax Period or Periods:"
year = line.partition(',').last
end
...
elsif line.include? "Tax Period or Periods:"
year = line.[line.index(',')+1..line.index(',')+4]
end
Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.
TRUSTED BY
ASKER