Mark Sewrots
Mark Sewrots

Reputation: 23

Regex for a few words

I have few words:

put
returns 
between 
4paragraphs

How can i do regex for this? I use function preg_match in PHP. I can use only one word for this four words.

Upvotes: 2

Views: 283

Answers (1)

mohammad falahat
mohammad falahat

Reputation: 748

use a list of words:

\^[put|returns|between|4paragraphs]\$

Upvotes: 5

Related Questions