Search the manual:

Overview Quick start Download Manual How to buy FAQ Contact Us
OZEKI NG SMS Gateway - Product Guide

Multi provider Contents | SearchConvert phone numbers into international format

Home > Product Manual > User Guide > Configuration > Outbound routing > Regular expressions

SMS Gateway SMS Gateway Home

  Product Manual
  Introduction
  SMS technology
  Installation Guide
  User Guide
  Quick Start Guide
  User Interface
  Configuration
  Inbound Routing
  Outbound routing
  Least cost routing
  Backup routing
  Multi provider
  Regular expressions
  Convert phone numbers into international format
  SQL logging
  Source routing
  Sender address
  Content manipulation
  Charset handling
  Client software
  Administrator's Guide
  Developers Guide
  Examples and Solutions
  Appendix
  FAQ
  Feature list
  Commercial Information
  Search
 

Contact Us!
If you wish to get further information, do not hesitate to contact us!

E-mail: info@ozekisms.com

If you have a technical question, please submit a support request on-line.

Regular expressions with "AND" and "OR"

On this page you will find detailed information on the connection of regular expressions with "AND" and "OR" operators. With regular expressions you can define conditions for routing. Read more about this solution on this page.

So with regular expressions you can define match patterns as conditions for message routing. These patterns can be connected with logical "OR" or "AND". If the pattern is matched then the message will be sent out to the destination on the defined route. Please check our examples on this page.

For example, a regular expression is provided as a condition to the recipient telephone numbers beginning with "310" or "311" in the following way:

If you enter /^(310|311).*/ in the Condition 2 line, then if the phone number of the recipient matches the directives of this condition; so if the phone number of the recipient starts with "310" or "311" (and "310" or "311" can be followed by any digit) the outgoing SMS messages will be sent out using the SMPP connection. In this way, this rule will be met in case of phone numbers: "3101234" and "3112345" but it is not matched in case of "06303101234" phone number.

Figure 1 - Recipient phone number begins with 310 or 311

If you use international telephone number format (starts with "+"), you can use the following regular expression: /^[+]*(310|311).*/

Among regular expressions, by default there is an "AND" connection. Therefore, the provided values are connected by "AND" connection. If you provide a regular expression as a condition, there will be an "AND" connection among its elements. For example, if the text of the outgoing message starts with "John" and ends with "Smith", then messages will be sent out through the installed GSM modem. This condition will be matched both in case of the message of "John Smith" and "John Edward Smith". But if the text of the message is "Smith John" then this condition will not be met (Figure 2).

Figure 2 - The message starts with "John" and ends with "Smith"

Related pages:





Next page: Convert phone numbers into international format
Source: http://www.ozekisms.com/index.php?owpn=614, Word count: 729
Copyright © 2000 - 2010 Ozeki Informatics Ltd.
All rights reserved

Legal information        |         Privacy policy        |         Terms of use
Please, address your inquiries to info@ozekisms.com