SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Make a Regelure Expreesion grab ###textHere###

    Hello PHP Guys.

    can Anyone help me make this regular expression:

    Code:
    ###anythinghere###
    
    This is my guess:
    /'###'a-zA-Z0-9'###'/
    Thank you I dont know how to accompish this

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $Text 'Hello, this is outer text and ###thisissomeinnertext### but you only want the inner text, don\'tya!';
     
    $Contents Preg_Match('/#{3}([A-Za-z\d]+)#{3}/'$Text$Matches) ? $Matches[1] : false;
    echo 
    $Contents
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #3
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you That is good guy


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •