I have a String for a routing key:
"key modifier path.to.routing.key;"
"key"is always present (I don't need to store this part)"modifier"(a word) can appear 0 or more times (I need to store the modifiers)"path.to.routing.key"Is the actual key and will always be the last component of the line followed by a ";" There may be 0 or more '.' characters in the routing key but always at least 1 word (I need to store this part).
The string will be on its own line in a file with other non interesting text [so I cant just use String.split(" ");]. I plan to use regex Patterns to get it out using:
Pattern p = Pattern.compile("...pattern...");
Im new to java regex and could do with some help,
How can I use Pattern to seperate this String into its components?
Some examples if it helps:
key public direct routing.key;
key direct routingkey;
