We have a database where every table name starts with WW. I want to display an SQL on a web page, but wrap each table name with a link. For example:
"select * from wwx_something where ..."
Should be transformed into:
"select * from <a href='/table/wwx_something/'>wwx_something</a> where ..."
There might be several tables, of course, and it should not be case-sensitive.
I need a javascript regex solution...I can't seem to get it to work.