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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:33:53+00:00 2026-06-01T21:33:53+00:00

I have to split each word and compare it with in-built local dictionary and

  • 0

I have to split each word and compare it with in-built local dictionary and replace it with the equivalent word in another language.When I split a words with special characters (*eg:*of!) it will not match with dictionary even if they are the same.

Now I need to replace those special characters by empty strings.

$opis="of!";
$a=preg_replace('!"#$%&/()=?*+'-.,;:_', '', $opis);
print_r($a);
  • 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-01T21:33:55+00:00Added an answer on June 1, 2026 at 9:33 pm

    You can use str_replace or preg_replace

    Example preg_replace http://php.net/manual/en/function.preg-replace.php

      $str = preg_replace("/\W+/", '', $str);
      var_dump($str);
    

    Example str_replace http://php.net/manual/en/function.str-replace.php

    $search =  '!"#$%&/()=?*+\'-.,;:_' ;
    $search = str_split($search);
    $str = "OF!" ;
    
    var_dump(str_replace($search, "", $str));
    

    Output

    string 'OF' (length=2)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my sources split up in several directories, so for each directory I
I have a large Java app that is split up into multiple projects. Each
I have to split the word in a sentence which contains more than 40
Greetings, I want to capitalize each word in a script, for this I have
My objective is to read an XML text file and split each word and
I have split the string already (which was Victoria Adelaide Mary/Wettin/ but now that
I have a windows forms app where I have split different functionality into several
Our application is well structured (well we did our best!) and we have split
Say I have I split-window with C-x 2 or C-x 3 and then I
Let's say I have a split view, and I want to fill half of

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.