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 8572829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:06:49+00:00 2026-06-11T19:06:49+00:00

EDITED I googled to write a custom regular expression for my web application, and

  • 0

EDITED

I googled to write a custom regular expression for my web application, and still I can’t get what I wanted.

I want to check if a string passes this pattern or not:

*STRING*STRING INCLUDING ALL CHARS*STRING INCLUDING ALL CHARS#

for example:

*STRING*the first string تست یک*the second string تست دو#

Should return TRUE

*sdsdsd*the first string تست یکthe second string تست دو#

should return FALSE(because it’s not the pattern as *STRING*STRING*STRING#)

$check = preg_match("THE RULE", $STRING);

I’m asking for THE RULE here, sorry if I asked my question in a wrong way…

  • 1 1 Answer
  • 0 Views
  • 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-06-11T19:06:50+00:00Added an answer on June 11, 2026 at 7:06 pm

    To check if a string has this pattern or not: *STRING*STRING*STRING#:

    if (preg_match(
        '/^       # Start of string
        \*        # Match *
        ([^*]*)   # Match any number of characters except *
        \*        # Match *
        ([^*]*)   # Match any number of characters except *
        \*        # Match *
        ([^#]*)   # Match any number of characters except #
        \#        # Match #
        $         # End of string/x', 
        $subject, $matches))
    

    Then use

    filter_var($matches[1], FILTER_VALIDATE_EMAIL)
    

    to check whether the first group might contain an e-mail address.

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

Sidebar

Related Questions

Edited: I want to get the actual with of the document with JS. I
i m using .NET mvc2 for my application. I want some custom authorization on
I want to create an application where users can mark on map location of
(Edited for clarification) My (non-OSGi) application build is in Gradle, and I am trying
Edited with a SSCCE and a workaround I want to programmatically change the location
I developing a web application using GWT where i am trying to upload a
how i can convert PWSTR variable to uppercase in vc++ . I googled but
I'm working on a project where we want to write to a mysql database,
I wrote javascript which dynamically edits an svg element. I want to get the
Ok i edited my code i dont get errors but the messageBox.Show return nothing

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.