Answers for "multiline matching regex"

1

multiline matching regex

# Say you want all lines between the line "first-line-excluded" and "last-line-excluded"
Regex = "first-line-included((?:\s|.)*)last-line-included"
# Set the "Multi-line" option to true

# E.g. If the text has this form
	# before first line
	# first-line-included
	# 1
	# 2
	# ...
	# last-line-included
	# after last line
# the regex will return 
	# first-line-included
	# 1
	# 2
	# ...
	# last-line-included
Posted by: Guest on January-23-2022
0

Regex to match a multiline comment

((\/)([\*][\*]?)(.|\n)*?\3\2)|(\/\/.*)
Posted by: Guest on February-16-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language