Search code examples
mysqlsearchnetbeansmyisam

Netbeans search for 2 terms per row


Is there a way to search for 2 items with "Find in projects" - search or CTRL+F, for example, looking for table joins in a PHP source code:

LEFT JOIN table_name column_name ON another_table_name;

where I would like to look for JOIN and table_name. What I am trying to accomplish here is to look for table connections in Netbeans between MyISAM tables and reverse-engineer a database schema.

Syntax could be something like table_name +JOIN, or table_name AND JOIN.


Solution

  • Turn on Regular Expression and Try the below regex :

    \bJOIN\b.*\btable_name\b|\btable_name\b.*\bJOIN\b
    

    Demo : https://regex101.com/r/RQ5jmF/1

    Explanation :

    \b -> word boundary 
    .* -> matches any character (except for line terminators) zero and unlimited times