title: JSX question with ahref tags. Different text input int the backend and need it to render on the react front end as a hyperlink
body: <p>I'm super new to react but I've been tasked with to me is a super complicated task to me and I was wondering if it could be done. I have an already built backend system backend system where the librarian enters their information sources which may be a website. So they can type in the system a <code>&lt;a href = "google.com"&gt; Where everything is &lt;/a&gt;</code>  and it comes up as a clickable hyperlink in their system . This is the fun part. The react front end is a public website for everyone else and renders all of this is as just plain text. So on the react side, I'm not getting any hyperlinks because obviously it's react and just rendering the text in this thing called a note. I've tried </p>
  
  <pre><code>export const NoteDisplay: React.FC&lt;{ note: Note }&gt; = ({ note }) =&gt; {
    switch (note.kind) {
      case "text":
        return (
          &lt;div&gt;
            {" "}
            {note.text.map((content: string, idx: number) =&gt; {
              const result = [];
              const matches = content.match(
                /(.*?)(&lt;a href=")?(https?|www)((".*?&gt;.*?&lt;\/a&gt;)|[^\s&gt;]?)*(.*?)/gi
              );
  
              if (!!matches) {
                matches.forEach((match) =&gt; {
                  let link;
                  if (/href="/i.test(match)) {
                    const url = match
                      .match(/&lt;a href="(.*?)(?="&gt;)/i)![0]
                      .replace('&lt;a href="', "");
                    const linkText = match
                      .match(/(?:&lt;a href=".*?"&gt;)(.*)(?=&lt;\/a&gt;)/)![0]
                      .replace(/(?:&lt;a href=".*?"&gt;)/i, "");
                    link = &lt;a href={url}&gt;{linkText}&lt;/a&gt;;
                  } else {
                    const url = match.match(/(https?|www)[^\s]*/gi)!.join("");
                    link = &lt;a href={url}&gt;{url}&lt;/a&gt;;
                  }
  
                  const splitter = match.match(
                    /(&lt;a href=")?(https?|www)[^\s]*(.*&lt;\/a&gt;)?/gi
                  )![0];
                  const paredPlainText = match.split(new RegExp(splitter));
                  result.push(paredPlainText[0]);
                  result.push(link);
                  result.push(paredPlainText[1]);
                });
              } else {
                result.push(content);
              }
              console.log(result);
  
              return &lt;p&gt;{result}&lt;/p&gt;;
            })}
          &lt;/div&gt;
        );
  </code></pre>
  
  <p>and its just spitting back <code>&lt;a href = "google.com"&gt;&lt;/a&gt;</code> where the google link is clickable but not even the <code>where everything is</code> part is showing. What I want is only for the where everything is part to show and be a clickable link to google.com </p>