Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Javascript Regular Expressions
  • Table Of Contents Toc
  • Feedback & Rating feedback
Javascript Regular Expressions

Javascript Regular Expressions

By : Loiane Groner, Gabriel Manricks
4 (7)
close
close
Javascript Regular Expressions

Javascript Regular Expressions

4 (7)
By: Loiane Groner, Gabriel Manricks

Overview of this book

This book is ideal for JavaScript developers and programmers who work with any type of user entry data and want sharpen their skills to become experts.
Table of Contents (8 chapters)
close
close

Chapter 5. Node.js and Regex

So far, we've had fun learning how to create regular expressions for different situations. However, you may be wondering what it would be like to apply a regular expression in a real-world situation, such as reading a log file and presenting its information in a user-friendlier format?

In this chapter, we will learn how to implement a simple Node.js application that reads a log file and parses it using a regular expression. This way, we can retrieve specific information from it and output it in a different format. We are going to test all the knowledge we obtained from the previous chapters of this book.

In this chapter we will cover the following topics:

  • Installing the required software to develop our example
  • Reading a file with Node.js
  • Analyzing the anatomy of an Apache log file
  • Creating a parse with regular expressions to read an Apache log file
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Javascript Regular Expressions
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon