title: How to identify a particular pattern exists in a string using javascript?
body: <p>Hi i am new to programming and i would like to find if a particular pattern exists in a string.</p>
  
  <p>I have a string <code>"i am [1234@some data] some data given to [223@123some data]"</code></p>
  
  <p>I want to check if the string contains pattern like <code>[1234@some data]</code> or <code>[223@123some data]</code> is present. So it includes square-bracket followed by one or more digits followed by one @ character followed by zero or more digits followed by one or more alphabets followed by space and one or more alphabets. </p>
  
  <p>What i have tried?</p>
  
  <pre><code>const string = "i am [1234@some data] some data given to [223@123some data]"
  const pattern_present = string.match((/^\d+\@+\w+$/)
  </code></pre>
  
  <p>This doesnt seem to work. Could someone help me with this</p>