score:0

return (
  <ol>
    {chat.map((chatMessage) => {
      return chatMessage.match(regex) ? (
        <li>
          <a href={chatMessage}>{chatMessage}</a>
        </li>
      ) : (
        <li>{chatMessage}</li>
      );
    })}
  </ol>
);

Related Query

More Query from same tag