Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6870597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:42:10+00:00 2026-05-27T03:42:10+00:00

I think this is probably a fairly easily answered question: Im new to regular

  • 0

I think this is probably a fairly easily answered question:

Im new to regular expressions in general, but I have recently heard that filter_var is almost replaceing the expressions.

I can see, after looking at the function, that I could validate emails in general. But is there capabilities to narrow the validation?

My issue is im trying to validate an email to only return true if it ends in @boisestate.edu OR @u.boisestate.edu. I cant seem to figure out if filter_var has those kinds of specific capabilities. Any help would really be appreciated! Also, if you have a reg expression or filter_var function that would suit this validation…Id really appreciate it!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:42:10+00:00Added an answer on May 27, 2026 at 3:42 am

    Use filter_var to validate the e-mail, then check if it ends in @boisestate.edu, etc. afterward using substr_compare($theEmail, $theSuffix, -strlen($theSuffix), strlen($theSuffix)) === 0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think this question is probably fairly simple, but I've been searching around and
Ok, I think this is probably an easy question but for the life of
I think this could be a very easy question for you. But I have
I think the title for this question is probably wrong, but I'm not sure
this is probably a fairly easy question and I think it's more amusing than
I'm fairly new to Rails, I got this code working but I think I'm
I think this is probably a fairly common but I haven't found a match
(I think this is a pretty basic question on OOP, but unfortunately I wasn't
I think this is a simple and a silly question. I have included a
Ok, so this seems bad (and it probably is, but i have enough doubts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.