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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:03:19+00:00 2026-06-11T03:03:19+00:00

I have used two testers of regex, http://www.pagecolumn.com/tool/pregtest.htm and http://www.spaweditor.com/scripts/regex/ both return the results

  • 0

I have used two testers of regex, http://www.pagecolumn.com/tool/pregtest.htm and http://www.spaweditor.com/scripts/regex/ both return the results I want but when ever I go ‘Live’ I get no results.

Heres the script I’m trying to get working:

$ptn = "/\\x(..)/";
$str = "\x47\x4c\x4f\x42\x41\x4c\x53";
preg_match_all($ptn, $str, $matches, PREG_PATTERN_ORDER);
print_r($matches);

Anyone know where I’m going wrong?

  • 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-11T03:03:21+00:00Added an answer on June 11, 2026 at 3:03 am

    PHP converts your $str string into its actual characters, you are actually testing the string "GLOBALS".

    If you don’t want escape sequences to be parsed, use single quotes:

    $ptn = '/\\\x([0-9a-f]{2})/i';
    $str = '\x47\x4c\x4f\x42\x41\x4c\x53';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used the algorithm on http://www.movable-type.co.uk/scripts/latlong.html to find the distance between two points.
I have two SQL Server (2000) databases. Both are used for the same project,
I have tried to make this simple Jquery game http://www.abkeya.com/2011/02/14/simple-jquery-game/ Most of the parts
I have used two GUIDs to open the folders My Computer and My Documents
I have used a join query for retrieving value from two tables one is
I have two Java interfaces and one implementing class. (I have used Eclipse to
I have seen two commonly used techniques for adding the directory of the file
I have two text-boxes which are used to select a From and a To
I have two tables which are used to store details of different types of
I have two batch files which is used to run a large C++ build,

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.