gpt-3.5-turbo-0301· openai
from WildChat-4.8M
Write one-line Groovy to do a regex substitution for a string
- User
Write one-line Groovy to do a regex substitution for a string
- Assistant
myString.replaceAll(/regexPattern/, replacementString)
- User
make it replace the newlines with \n
- Assistant
myString.replaceAll(/\r?\n/, '\n')