EmailController

Run regex against hydrated email body and return matches

Executes a Java regex pattern over hydrated email body text and returns the full match plus capture groups. Pattern syntax follows Java Pattern rules.

post/emails/{emailId}/contentMatch

Request

  • Base URL: https://api.mailslurp.com
  • URL: https://api.mailslurp.com/emails/{emailId}/contentMatch
  • Auth: API key in header x-api-key

Path parameters

emailIdstring uuid required

ID of email to match against

Request body

patternstring required

Java style regex pattern. Do not include the typical / at start or end of regex in some languages. Given an example your code is: 12345 the pattern to extract match looks like code is: (\d{6}). This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: ['code is: 123456', '123456'] See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.