# Regex Separator

**URL:** <https://forum.kirupa.com/t/regex-separator/195162>\
**Category:** programming\
**Created:** [July 29, 2006, 2:40am UTC](https://forum.kirupa.com/t/regex-separator/195162 "2006-07-29T02:40:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [July 29, 2006, 2:40am UTC](https://forum.kirupa.com/t/regex-separator/195162/1 "2006-07-29T02:40:16Z")

</div>

Alright, I’m sure this is obvious, but I’m looking for a regex which will match any number of times (i.e., once or more, +), but must have a ‘.’ between each one, and not one before or after. I mean, I want it to match test.test, or [font=monospace]test.test.test[/font], with, say, font=monospace[/font] as the pattern matching [font=monospace]test[/font].

Clearly I could just do something along the lines of font=monospace(.[^.]+)\*[/font]. The problem with this, is I had to repeat [font=monospace][^.]+[/font], which in my case, is quite long.

I’m looking for a solution which doesn’t require me repeat it… look-ahead assertions and such are no problem, and I’m using the python regular expression syntax ([http://docs.python.org/lib/re-syntax.html](http://docs.python.org/lib/re-syntax.html)).

Thanks 🙂
