RegEx to avoid numbers?

If it has to be a regexp to match such a string:

  /\A[^\d]*\z/

But if possible, it's usually easier to invert the operator:

  str !~ /\d/

For example, in a validation:

  def validate
    thing !~ /\d/ or
      errors.add :thing, "cannot contain numbers"
  end

HTH.

Hi --

D'oh! Thanks for the reminder, David. :slight_smile: