Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to write regular expression validator in multiple line

Simon Chu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 27, 2024

I have texts in multiple lines, for example:

2023.11.12_16.37_AAA_BBBB

2023.11.12_16.37_AAA_BBBB

I am using the regex pattern "\d{4}.\d{2}.\d{2}\d.*?\w.*$" to check the format.

However, it only works for one line. Can anyone help me modify it to work with multiple lines?

1 answer

0 votes
Aron Gombas _Midori_
Community Champion
March 28, 2024

It slightly depends on the implementation you use, but generally in Java adding the "/s" modifier is the answer.

See: https://stackoverflow.com/a/159139

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events