Given a string of unstructured text, write a function to tokenize and extract specific patterns without using heavy external libraries for Intelligent Medical Objects clinical text processing. The function receives text and a dictionary of named regular-expression patterns. Return word-like tokens and all matching substrings for each pattern, preserving their original order. Use only Python's standard library and return an empty list when a pattern has no matches.
Input: text is a string and patterns maps unique names to regular-expression strings. Output: return {"tokens": [...], "matches": {name: [...]}}.
def tokenize_and_extract(text, patterns):