logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • How can we extract string "abc.com" from a string "https://info@abc.com" using regular _expression of php?


  • Correct Answer
  • We can use the preg_match() function with ?/*@(*)$/? as the regular expression pattern For example: preg_match("/*@(*)$/","https://info@abccom",$data); echo $data[1]; ?> 


  • Technology problems


    Search Results


    • 1. Explain include(), include_once, require() and require_once.
    • Discuss
    • 2. How do you destroy a particular or all Sessions?
    • Discuss
    • 3. What is a Session?
    • Discuss
    • 4. What are the differences between GET and POST methods in form submitting?
    • Discuss
    • 5. What is the functionality of md5 function in PHP?
    • Discuss
    • 6. What are the different types of errors in php?
    • Discuss
    • 7. What is the functionality of the function strstr and stristr?
    • Discuss
    • 8. What are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
    • Discuss
    • 9. What are encryption functions in PHP?
    • Discuss
    • 10. How to set cookies?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment