Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kelly Manahan #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions projects/state-mach-regex/extractlinks/extractlinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ const filename = args[0];
// !!!! IMPLEMENT ME

// Read file

fs.readFile(filename, "utf8", function read(err, data) {
if (err) {
throw err;
}
// Set up regex

const href = data.match(/href="...+"/g)
// Find matches

const link = http.match(href)
Copy link
Author

@kellymanahans kellymanahans Sep 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is where i got confused. also http should not be there, it's a typo

// Print all matches

console.log(link)
})
// regex expression:
// /href="...+"/g