Regular expression in JavaScript

What is regular expression?

JavaScript regular expression (regex or regexp) provides a very easy way to match a string with a specific pattern. Regular expression are very powerful tool for searching and finding text. It can match particular characters, numbers, wildcards, and ranges of characters. For example with the use of regex we can do complex form validation or we can find string in whole page.

Basic rules and meanings

  • ^ start with
  • $ end with
  • g Global
  • i Case Insensitive
  • [^r] should not start with r word
  • ^[a] it should be start with a
  • [a-z] it should be between a to z range only one character
  • [0-9] it should be between 0 to 9 range only one character
  • [a-z A-Z] it could be either small a to z or capital A-Z only one character
  • [0-9]{4,5} user can add only 4 or 5 number between 0 to 9.
  • [0-9]+ enter any one digit between 0 to 9 multiple times (plus means least one times and then multiple time)
  • c*a means at least one is not nessessary it will still match if you write only a
  • .abc dot means add any character in keyboard.(&abc)
  • .+ match anything from keyboard.
  • 1234?5 means optional previos character 1235
  • abc|123 means OR a1,b2

Examples

[abc]egular
aegular
begular
cegular

[^r]egular
aegular
zegular

^[0-9]9$
39
59
69

[Regular]ar
Rar
ear

/^[1][0-9]{10,11}$/
18574757588
188858585889

Test regular expression here Go to

40 thoughts on “Regular expression in JavaScript

  1. postingfhct

    Dear sir!

    Organic growth of factors influencing consumer behaviour.
    website: xn—-ftbeand5abdikisgee.xn--p1ai/home/

    Behavioural factors are certain actions of users on the internet resource, such as:
    logging in to the online resource, viewing pages, time spent on the website, link clicks, repeated returns to the online resource.

    Unique Trading Offer:
    Large-scale placement of your ads on the Internet in order to attract potential customers.
    Growth of behavioural factors occurs by the mass placement of your ads without specifying the address of your online resource, but with the indication of other identifying features according to which you directly become number one in the search engine results. These features can include a phone, a unique name of the website or company, an identifier (number, product code, promotions, services), a physical address of the organisation and etc.

    MAIN AIM:
    The widespread attraction of potential customers to your website, services and products.
    Organic growth of behavioural factors.

    YOUR BENEFIT:
    An increase in website visitors who will find your webpage directly from ads using search engines as well as through additional results of a search itself related to a the widest range of key queries on your subject.

    ADVANTAGES OF THIS AD:
    1. Mass promotion.
    2. Placement speed.
    3. Cost.
    4. Placement by subject.
    5. Wide reach.
    6. Targeting.
    7. Organic growth of factors influencing consumer behaviour.

    REASONS TO ORDER LARGE-SCALE ADS PLACEMENT ON THE WEB ДЛЯ GROWTH OF FACTORS INFLUENCING CONSUMER BEHAVIOUR:

    1.Widespread attraction of potential customers to your services and products through direct access from ads.
    2.Organic promotion of your web page, due to search engine beginning to additionally suggest it for a large range of search queries based on your topic.
    3. The absence of “bans” and “filters” of search engines, due to ads being placed without an indication of an link to the online resource.
    4. An increase in web page traffic, which leads to an increase in orders and an expansion of the your customer base.
    5. “Warm traffic”, since only engaged users visit the online resource.
    6. Attraction of individuals and legal entities.
    7. Analysis of demand for goods and services.
    8.Placement of your ads in different countries all over the world.

    WHERE ADS ARE PLACED:

    Ads are published: on billboards, in guest books, in comments, on forums, in catalogues.
    Ads are placed on your: landing pages, YouTube videos, phones, websites, social media accounts, and on links to your other ads.

    SEARCH ENGINE SANCTIONS:
    In this ad a ban by search is not possible, since ads are published without specifying an URL to the web page.

    Your actions:
    You send us the text of the ad, where your identifier or unique name is indicated at the end of the message, according to which an engaged visitor can easily find your website in search engine results in order to get further information about your service.
    To do this, identifier or a unique name must be published in the appropriate section of your website и easily and quickly be found in results.

    Randomisation:
    Randomisation of ads is carried out according to the formula, which is accepted by many programs. As a result of randomisation, many unique ads are obtained from a single ad variant.

    This is achieved by manually synomising the ad text, while the meaning of the messages does not change and remains understandable.

    website: xn—-ftbeand5abdikisgee.xn--p1ai/home/

Leave a Reply

Your email address will not be published. Required fields are marked *