/ Published in: Regular Expression

I\'m trying to find an expression to match a whole sentence. So really the pattern is the regex of the subject.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$subject = "Check out the newest #WordPress premium theme marketplace"; $pattern = "/Check out the newest #WordPress premium theme marketplace http://themelit.com/$"; if ( preg_match_all( $pattern, $subject, $matches ) ) $msg = array( "code" => "success", "message" => __("Thanks for tweeting!" ) ); else $msg = array( "code" => "error", "message" => __("You haven't tweeted anything yet." ) );
Comments
