Skip to content

Searching for a substring with a newline using the "contains" function #25134

Discussion options

You must be logged in to vote

@bryangingechen ,

You can set to return the value of  github.event.comment.body as JSON-type  via the toJson function. In the JSON-type, the line-break will be converted to ’ \r\n’.

if: startsWith(github.event.comment.body, 'foo') || contains(toJson(github.event.comment.body), '\r\nfoo')

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants