Anyone have any pointers, how can I store wildcards in the database and see which lines (lines) match the line? It can be done?
eg. DB contains a table like:

Thus, john3136 should receive a 10-fold salary. fred3136 would receive half its regular payment. harry3136, possibly the application crashes because there is no relevant data; -)
The code should do something like:
foreach(Employee e in all_employees) { SELECT Multiplier FROM PayScales WHERE
Thanks!
Edit This is a real world problem: I have a parameter file containing wildcards. The code is currently iterating through employees, iterating through a param file looking for a match - you can understand why I would like to "databaserize" it; -)
Wildcards are optional. The line could say "john3136" for only one employee. (The real application is not really an employee, so it makes sense even if it looks redundant in this simple example)
One option is open: I know all the names of the employees before I start, so that I can iterate through them and effectively expand the wildcards in the temporary table. (therefore, if I have john3136 * in the start table, it can expand to john3136, john31366, etc. based on the list of employees). I was hoping to find a better way than this because it requires more maintenance (for example, if we add functionality to add an employee, we need to maintain an extended wildcard table).
sql regex
John3136
source share