Take the 2-minute tour ×

There is a pattern in my texts and I need a preg_match pattern for next line.

Administrative Contact:
xxxx xxxxx

this is like this sometimes :

Admin contact: 
xxxxxx xxxx
admin data:
xxxx xxxx

Is it possible to write a regular expression for this ? I need xxxx xxxx data

Thank You Guys

share|improve this question
Is this part of a large piece of text? –  Ja͢ck May 30 '12 at 16:27

1 Answer 1

up vote 0 down vote accepted

It looks like the common factors are:

  • Starts with "admin"
  • Has a : to separate the label from the data
  • Has data until the end of a line

In this case, the regex is:


The desired data will be in subpattern 1.

share|improve this answer

Your Answer


