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

  • Home
  • SEARCH
  • 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 7751007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:26:17+00:00 2026-06-01T11:26:17+00:00

I need help with preg_match function in php. I have read a lot of

  • 0

I need help with preg_match function in php. I have read a lot of answers on SO, but I can’t get any needed information.

So, I would like that preg_match check for characters a-z, A-Z, 0-9, special characters č, š, ž, đ, ć, Č, Š, Ž, Đ, Ć and ! " # $ % & / ( ) = ? * ° ' + - * . , - _ ; :

For first part (a-z, A-Z, 0-9) I saw how it is done, but for next part I don’t have idea.

  • 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-01T11:26:19+00:00Added an answer on June 1, 2026 at 11:26 am

    Simply list all characters in a character class:

    [a-zA-Z0-9čšžđćČŠŽĐĆ!"#$%&/()=?*°'+*.,_;:-]
    

    Since the minus sign bears special semantics, I moved it to the end where it, well, doesn’t have special semantics. Make sure your editor encoding matches the input encoding (i.e. use UTF-8 everywhere).

    By the way, that list is really excessive. You may want to simply use \w, which stands for an arbitrary word character, or \S (anything but whitespace).

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

Sidebar

Related Questions

I'm in need for php help/expertise to tweak/change this preg_match_all function. What I want
I need help on regex or preg_match because I am not that experienced yet
I need help converting eregi_replace to preg_replace (since in PHP5 it's depreciated): function makeClickableLinks($text)
need help/guide for sql select query, I have 2 table stock and stock_history, in
need help regarding USSD Gateway. I have to develop an app, which will directly
need help in error in database pivot. i have table tamed table_score like below:
Can anybody help with a valid regex ? I have a files containing functions
I need to port some simple eregi regular expressions to preg_match for PHP 5.3/6.0
Can someone please help me with this preg_match if (preg_match('~[^A-Za-z0-9_\./\]~', $filepath)) // Show Error
May you can help me... many years ago my friend gave me php script

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.