How to find whether a substring is present in the big string or Not

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gauravgmbhr
    New Member
    • Feb 2007
    • 107

    #1

    How to find whether a substring is present in the big string or Not

    How to find whether a substring is present in the big string or Not
    The function that finds the substring inside the string should return in true Or False
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You'd better brush up your PHP language skills!
    See PHP documentation on the strpos function.

    Ronald :cool:

    Comment

    • gauravgmbhr
      New Member
      • Feb 2007
      • 107

      #3
      Originally posted by ronverdonk
      You'd better brush up your PHP language skills!
      See PHP documentation on the strpos function.

      Ronald :cool:
      this function i know very well
      but i was lookin for some direct function

      and the function has to be a perl-compatible function

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Then use the preg_* functions, like

        [php]
        $pattern = '/abcdef/';
        preg_match($pat tern, $text);
        [/php]

        Ronald :cool:

        Comment

        • gauravgmbhr
          New Member
          • Feb 2007
          • 107

          #5
          Originally posted by ronverdonk
          Then use the preg_* functions, like

          [php]
          $pattern = '/abcdef/';
          preg_match($pat tern, $text);
          [/php]

          Ronald :cool:
          THANX VERY MUCH

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            You are welcome.

            Ronald :cool:

            Comment

            Working...