Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events