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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:10:12+00:00 2026-06-17T07:10:12+00:00

$string = c4414b8e90510db12 GET /emailtrack/blank.gif?source=mailchimp&guid=12345&campaign=myCampaign HTTP/1.1 preg_match_all(‘/(GET.*?+)/is’,$string,$match); Result: Array ( [0] => Array (

  • 0
$string = "c4414b8e90510db12 GET /emailtrack/blank.gif?source=mailchimp&guid=12345&campaign=myCampaign HTTP/1.1"
preg_match_all('/("GET.*?"+)/is',$string,$match);

Result:

Array (
    [0] => Array (
        [0] => "GET /emailtrack/blank.gif?source=mailchimp&guid=12345&campaign=myCampaign HTTP/1.1"
    )

    [1] => Array (
        [0] => "GET /emailtrack/blank.gif?source=mailchimp&guid=12345&campaign=myCampaign HTTP/1.1"
    )
)

Parsing the string through preg_match_all just to fetch the GET String but it returns 2 results of GET string, I only need one result in the array

Thanks for the earlier answer it worked for me.

$string = "source=xxxx&campaign=asdas&guid=121"

Is there anyways you can help me with telling me a regex for extracting just the source=xxxxx from the string above

I tried this

preg_match_all('/source.*?\s/', $string, $match);

But it gives me the entire string ,I want to separate the strings source, campaign & guid

  • 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-17T07:10:13+00:00Added an answer on June 17, 2026 at 7:10 am

    The first entry of the result is always the full match. You also have additional parentheses around the entire pattern, which is becoming the first “subpattern”.

    Solution: Remove the parentheses.

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

Sidebar

Related Questions

String to pull from : http:\/\/c.ypcdn.com\/2\/c\/rtd?vrid=357c99c36bd7ed631eda2e43fc9e30f8&rid=283d465f-f63b-4b0d-90b0-be6c12ed7617&ptid=943aw4l8qj&ypid=11720135&lid=194823099&tl=6&lsrc=SP&dest=http%3A%2F%2FCleanation.com RegEx I have used before: www\..*?\.\w{2,5} However the
String.prototype.getLanguage = function() { $.getJSON('http://ajax.googleapis.com/ajax/services/language/detect?v=1.0&q=' + this + '&callback=?', function(json) { return json.responseData.language; });
String baseString=POST&; String subBaseString = oauth_consumer_key=+oauth_consumer_key+&oauth_nonce=+nonce+&oauth_signature_method=+oauth_signature_method; subBaseString += &oauth_timestamp=+ oauth_timestamp+&oauth_token=+oauth_token+&oauth_version=1.0; baseString += URLEncoder.encode(baseRequest, UTF-8);
string source = @C:\Users\damanja\Desktop\Projects\RecStudentManagement\RecStudentManagement.Web\Reports\Templates\ContactInformationReport.xlsx; string dest = @C:\Users\damanja\Desktop\Projects\RecStudentManagement\RecStudentManagement.Web\Reports\Ran\damanja2012-12-17T10:14:02.0394885-06:00.xlsx; File.Copy(source, dest, true); Produces this exception:
string to build up using keyvaluepair is like this: name1=v1&name2=v2&name3=v3 what i am doing:
String.fromCharCode(72) gives H. How to get number 72 from char H?
string strConn = Provider=Microsoft.Ace.OLEDB.12.0;Data Source= + filename + ;Extended Properties=\Excel 12.0 Xml;HDR=Yes;IMEX=1\;; I search
String s=asd http://www.blabla.com/bla/foo wert fgh; I want a string: asd <a href='http://www.blabla.com/bla/foo'>http://www.blabla.com/bla/foo</a> wert fgh
string emailfield=txtEmail.Text.ToString(); string url = http://localhost:3076/user/Authenticate-Users.aspx?email=+emailfield; I want to encrypt the querystring and then
string a = sea; string b = SEA if (a == b)... How could

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.