I need to find a bunch of files for everything that contains "tblPayment" or "tblInvoice"
I also want to match any tables with the name "tblPaymentMethod", "tblInvoiceItem", "tblInvoicePayment"
Anyone want to help me write a regex for this?
Thanks again!
tbl(Invoice|Payment)+
it will also match tables without a table prefix if you need this flexibility.
: (.. tblInvoice|tblPayment|...), RegEx , , . , , - , .
tblInvoice|tblPayment|...
.
tblPayment|tblInvoice|tblPaymentMethod|tblInvoiceItem|tblInvoicePayment
, .
tbl(Payment(Method)?|Invoice(Item|Payment)?)
, , , , .
Perl RE:
/tbl ((Payment(Method)?) | (Invoice(Item|Payment)?)) /x
python - : "TBL (- | )? +"
If you want to match any table name that starts with tblInvoice or tblPayment, then this will do:
tbl(?:Invoice|Payment)\w*
(?: Invoice | Payment) is a non-capture group (more effective in this case than a capture group). And then \ w * will not necessarily match the alphanumeric characters following it.
Source: https://habr.com/ru/post/1745144/More articles:Protected members in a superclass not available to an indirect subclass in Java - javaEquivalent to removing readonly from a file using TFS / MS SS in Mercurial - mercurialPartial AJAX rendering problems for default page in IIS 7 using custom HTTP module - ajaxOutput integral for ostringstream as binary? - c ++How to select a dynamic instance of datepicker to expand it with jQuery - jqueryPython enterprise platform design consultation - pythonIs there a way to check all controller variables at once in Rails? - ruby | fooobar.comhow to make jquery grid column as readonly? - jqueryObjective C Naming Convention for an object that it owns - objective-cWhere does optical character recognition (OCR) fall on the scale of the complexity problem? - complexity-theoryAll Articles