Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8712

Re: Wild Card

$
0
0

If you are using patterns or regular expressions then the period is the wildcard for any character and * means 0 or more occurances.  The expression (.*[0-9].*) would search for a number anywhere in the string.  There are also some other operators which are good to know such as + 1 or more rather than 0 or more.  The back of the IS manual has a full section on regular expressions and pattern matching.


I typically try to avoid the LIKE operator in expressions (rules, filters, etc.) and use it only in creating views.  If you are using LIKE then % is the wildcard as in SQL.  Concatenation uses || rather than + though so don't get yourself in trouble by trying to use a command LIKE '%' + $field + '%';


Viewing all articles
Browse latest Browse all 8712

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>