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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:21:58+00:00 2026-06-02T05:21:58+00:00

i have registry data in text as below: /Classes/CLSID/AppID,SZ,{0010890e-8789-413c-adbc-48f5b511b3af}, /Classes/CLSID/InProcServer32,KEY,,2011-10-14 00:00:33 /Classes/CLSID/InProcServer32/,EXPAND_SZ,%SystemRoot%\x5Csystem32\x5CSHELL32.dll, /Classes/CLSID/InProcServer32/ThreadingModel,SZ,Apartment, /Classes/CLSID/,KEY,,2011-10-14

  • 0

i have registry data in text as below:

/Classes/CLSID/AppID,SZ,{0010890e-8789-413c-adbc-48f5b511b3af},
/Classes/CLSID/InProcServer32,KEY,,2011-10-14 00:00:33
/Classes/CLSID/InProcServer32/,EXPAND_SZ,%SystemRoot%\x5Csystem32\x5CSHELL32.dll,
/Classes/CLSID/InProcServer32/ThreadingModel,SZ,Apartment,
/Classes/CLSID/,KEY,,2011-10-14 00:00:36
/Classes/CLSID/,SZ,,
/Classes/CLSID/InprocServer32,KEY,,2011-10-14 00:00:36
/Classes/CLSID/InprocServer32/,C:\x5CWINDOWS\x5Csystem32\x5Cmstime.dll,

then i do $registry = explode “\n” and create list of arrays below:

var_dump($registry);

[1]=> string(121) "/Classes/CLSID/AppID,SZ,{0010890e-8789-413c-adbc-48f5b511b3af}," 
[2]=> string(139) "/Classes/CLSID/InProcServer32,KEY,,2011-10-14 00:00:33" 
[3]=> string(89) "/Classes/CLSID/InProcServer32/,EXPAND_SZ,%SystemRoot%\x5Csystem32\x5CSHELL32.dll," 
[4]=> string(103) "/Classes/CLSID/InProcServer32/ThreadingModel,SZ,Apartment," 
[5]=> string(103) "/Classes/CLSID/,KEY,,2011-10-14 00:00:36"
[6]=> string(121) "/Classes/CLSID/,SZ,," 
[7]=> string(139) "/Classes/CLSID/InprocServer32,KEY,,2011-10-14 00:00:36" 
[8]=> string(89) "/Classes/CLSID/InprocServer32/,C:\x5CWINDOWS\x5Csystem32\x5Cmstime.dll," 

i also have keywords in array form

var_dump($keywords);

[1]=> string(12) "Math.dll"
[2]=> string(12) "System.dll"
[3]=> string(12) "inetc.dll"
[4]=> string(12) "time.dll"

i want to show lines in $registry that consist string in $keywords, so i create 1 function below:

    function separate($line) {
      global $keywords;
      foreach ($keywords as $data_filter) {
          if (strpos($line, $data_filter) !== false) {
        return true;
          }
      }
      return false;
    }

$separate = array_filter($registry, 'separate');

since in $keywords consists “time.dll” so the codes produce result as below:

var_dump($seperate);

[1]=> string(89) "/Classes/CLSID/InprocServer32/,C:\x5CWINDOWS\x5Csystem32\x5Cmstime.dll," 

in my case the result is not true because, mstime.dll != time.dll and the information is improper.

the output should be empty.

lets say i replace the “\x5C” as space, there is any function that can do the job? thank you in advance.

  • 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-02T05:21:58+00:00Added an answer on June 2, 2026 at 5:21 am

    There’s preg_match.

    To go along with the array_filter way you have to do things:

    function separate($line) {
        global $keywords;
        foreach ($keywords as $data_filter) {
            // '.' means any character in regex, while '\.' means literal period
            $data_filter = str_replace('.', '\.', $data_filter);
            if (preg_match("/\\x5C{$data_filter}/", $line)) {
                return true;
            }
        }
        return false;
    }
    

    This would return false for

    /Classes/CLSID/InprocServer32/,C:\x5CWINDOWS\x5Csystem32\x5Cmstime.dll,
    

    but true for

    /Classes/CLSID/InprocServer32/,C:\x5CWINDOWS\x5Csystem32\x5Ctime.dll,
    

    If you’re not familiar with Regular Expressions, they are awesome and powerful. You can customize mine as needed to suit your situation.

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

Sidebar

Related Questions

I have been trying to manupulate registry key from python using the win32api module
I have a program who's generating some data in registry. I save it with
I have a couple applications that store data in the registry for persistence. It
I have a block of code that opens and closes a registry key to
I have some data that I read from the registry and wish to modify.
I have an online registry of professionals with about 300 members. These are smart
If I have the following registry class: Class registry { private $_vars; public function
If have I have multiple processes accessing a registry value thousands of times per
I have these registrations in a registry and am trying to figure out the
I have some questions about the registry. We have Preferences p = Preferences.userRoot(); If

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.