vendredi 31 juillet 2015

Recursive checking a string for repeating pattern?

sorry if this is a duplicate but i couldnt find anything close.

i want to check recursively a string for the following pattern

[a-z0-9][:][a-z0-9][&][a-z0-9][:][a-z0-9]...

example

foo:bar&foo:bar1&foo:bar&foo:111&bar:2A2... 

is it possible with regex and if so anyone can show me a regex expression for this?

If there is a efficient java method for this, it would be also good.

Aucun commentaire:

Enregistrer un commentaire