title: Regex for only allowing letters, numbers, space, commas, periods?
body: <p>I am clueless with regex as it is complicated for me. I am working with a program that limits input from users based on a regex. I am currently after a regex that will only let the user input:</p>
  
  <pre><code>A-Z and a-z
  0-9
  .
  ,
  !
  ?
  </code></pre>
  
  <p>So basically anything in a typical paragraph or web article.</p>
  
  <p>The program states "Enter a regular expression which entered text must match (evaluated with preg_match, using s and i flags) for it to be valid."</p>
  
  <p>I have tried this regex with no success and I am currently searching for others to try.</p>
  
  <pre><code> '/^[a-zA-Z0-9,.!? ]*$/'
  </code></pre>
  
  <p>It should allow a simple sentence such as</p>
  
  <blockquote>
    <p>"HI my name is John! I like to eat apples, oranges, and grapes. Will you eat with me?</p>
  </blockquote>