kingschizo2722 Posted March 19, 2007 Share Posted March 19, 2007 I am doing a preg_match and preg_match_all that needs to be able to match the following format: Sentence with punctuation.:single_word--Multiple Sentences with punctuation. Example: This is a Note.:right--This is a note about nothing. You will find nothing about it here. If anyone could help me out on this I would be greatful. I just need the pattern I need to use to match a sentence with those parameters. Thank you! Link to comment https://forums.phpfreaks.com/topic/43317-i-need-help-with-a-parser-i-am-writing/ Share on other sites More sharing options...
effigy Posted March 19, 2007 Share Posted March 19, 2007 This may need to be adjusted depending on the surrounding data (if any): /^([^:]+)(??!--)[A-Za-z])+)--(.+)\z/ Link to comment https://forums.phpfreaks.com/topic/43317-i-need-help-with-a-parser-i-am-writing/#findComment-210495 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.