I am trying to use a regular expression to target times and add text to them. But my regular expression has a problem when the input string has line breaks. If I remove the breaks and test the expression, it works.
Also, after I have found targeted times, how do I add text in front of and behind them?
var str = "00:00:01.120
In this lesson, we will learn how to determine the equation of a line, using the available information.
00:00:08.040
Let's look at the first example. Determine the equation of the line, that passes through the points (2, 5), and with the slope of 2.
00:00:19.000
To begin, we should know that the equation of a line can be written in the form of y = mx + b, where m is the slope, and b is the y-intercept.";
var patt1 = /(\d\d.\d\d.\d\d.\d\d\d)/gm;
var result = str.match(patt1);