Why does using the RegEx /(?<=]),(?=(L|M|J|V))/gi with the JS split method give me this result?
The title explains my problem. I don’t understand why using the RegEx /(?<=]),(L|M|J|V)/gi with the JS split() method on a string gives me an unexpected result. Using said RegEx results in: [ ‘Lunes[9:00-13:00,14:00-16:00]’, ‘M’, ‘Martes[19:00-3:00]’, ‘M’, ‘Miercoles[19:00-21:00,0:00-3:30]’, ‘J’, ‘Jueves[6:00-8:00,8:30-10:30,16:00-20:05]’ ] instead of: [ ‘Lunes[9:00-13:00,14:00-16:00]’, ‘Martes[19:00-3:00]’, ‘Miercoles[19:00-21:00,0:00-3:30]’, ‘Jueves[6:00-8:00,8:30-10:30,16:00-20:05]’ ] My code: const pattern = /(?<=]),(?=(l|m|j|v))/gi; const… Read More Why does using the RegEx /(?<=]),(?=(L|M|J|V))/gi with the JS split method give me this result?