PHP Regexp - quick advice needed

Posted on 2008-11-19
Last Modified: 2012-05-05
Hi !
I have a blobdata in a MS SQL server containing the rubbish below:
)ýýýýýýýýýýýýýýýýýýýýý\\trg4\eh_shared\input\78-268P02475923.tifýýýýýç ý¬ýýý*ý!ýÿý

I need to extract the string "\\trg4\eh_shared\input\78-268P02475923.tif" - and nothing else...

I need a PHP function that will return this - who can help me ??

RegEXP or anything goes :-)
Question by:trg_dk
    LVL 22

    Accepted Solution

    try this

    $a = "@¬ýýýO_TRG_11ýýýýýýýýýØ
    )ýýýýýýýýýýýýýýýýýýýýý\\trg4\eh_shared\input\78-268P02475923.tifýýýýýç ý¬ýýý*ý!ýÿý";
    preg_match("(\\\\.+tif)", $a, $res);

    Open in new window

    LVL 2

    Author Comment

    GREAT :-)

    Thank you so much !!!!!
    LVL 2

    Author Closing Comment

    Thanks for the quick turnaround !!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now