ballouta Posted October 13, 2008 Share Posted October 13, 2008 Hello I have this old expression: <?php $Email_Comments = "Error processing your order for ASK file: 352946020686265.ask!"; $matches = "ask"; preg_match('/\S+\.ask(?=!)/i', $Email_Comments, $matches); $filename = $matches[0]; ?> Now the $Email_Comments format has been changed, <?php $Email_Comments = "This is an automatically generated email. DO NOT answer it! File: a.ask ERROR: Unsupported ASIC number! ()"; ?> Kindly I need to update my expression. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/128182-solved-expression-modification/ Share on other sites More sharing options...
JasonLewis Posted October 13, 2008 Share Posted October 13, 2008 Try this: preg_match('/\S+\.ask/i', $Email_Comments, $matches); $filename = $matches[0]; Quote Link to comment https://forums.phpfreaks.com/topic/128182-solved-expression-modification/#findComment-663865 Share on other sites More sharing options...
ballouta Posted October 13, 2008 Author Share Posted October 13, 2008 Yes it is working 100% Kindly another help: if the $Email_comments this time is: This is an automatically generated email. DO NOT answer it! File: 35551301328124x.ask - processed successfully! the file name in red is needed. thank you Quote Link to comment https://forums.phpfreaks.com/topic/128182-solved-expression-modification/#findComment-663872 Share on other sites More sharing options...
JasonLewis Posted October 13, 2008 Share Posted October 13, 2008 Uh-huh, the expression I provided above should match it. Quote Link to comment https://forums.phpfreaks.com/topic/128182-solved-expression-modification/#findComment-663878 Share on other sites More sharing options...
ballouta Posted October 13, 2008 Author Share Posted October 13, 2008 yes great, it is working for both Many thanks for you (Nofear with ProjectFear) Quote Link to comment https://forums.phpfreaks.com/topic/128182-solved-expression-modification/#findComment-663882 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.