php - RegExp for capturing "headline" trigger words in textarea -
I am trying to write a regexp for a "php preg_split" so that some text like "headline" Be captured
I want to use the resulting array to improve the formatting for the user and I want to create a streamlined view in the review posts. This is my sample text input In this case [0] should be in the form of identification line, 4 Pro results (with their delimiter), 1 conte (Empty) and 7 result results (with their delimiter). Only the Contra should be empty and the last line should be a part of the final conclusion I am trying to make some matches like this In this order First of all, I think you want:
Introduction line one, the first part of the array Pro: Pro: Double Pro 1, no space between Pro: Pro: Pro: Pro: Between Pro, Pro: Pro Pro: Double Pro 2, Between Space, Pro Space: Should create blank Pro entry Contra: Conclusion: Last Contra was empty Conclusion: This Contra : These should not match this line! Conclusion: Test with spaces between the conclusions: Conclusions: The conclusion was prefixed by a space conclusion: This conclusion was prefixed by a tab conclusion: the conclusion was a space between the conclusions by two tabs: this conclusion There is a space between the conclusions and:
[^ | \ n] * It means 0 or more characters which is the pipe
| or the line breaks are not.
[\ t | ] * 0 or more characters that are tabulation or pipe
| or no place
/ \ S * \ b (Pro | Contra | conclusion): [\ t] * / i
Comments
Post a Comment