Need a regular expression matching </div><div class="cloud">

Posted on 2011-10-31
Last Modified: 2012-05-12
Please provide me a regular expression that matches </div><div class="cloud"> at the end of a string.

Question by:unceasing
    LVL 34

    Expert Comment

    by:Terry Woods
    /<\/div><div class="cloud">$/
    LVL 31

    Expert Comment

    LVL 84

    Expert Comment

    m{</div><div class="cloud">$}

    Author Comment

    I actually need to use this regular expression in javascript code.
    LVL 31

    Accepted Solution

    You need string.match kind of syntax.

    string.match(/<\/div><div class="cloud">$/)

    should work
    LVL 74

    Expert Comment

    by:käµfm³d 👽
    TerryAtOpus' pattern is Javascript ready--as farzanj demonstrates  = )

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    by Batuhan Cetin Regular expression is a language that we use to edit a string or retrieve sub-strings that meets specific rules from a text. A regular expression can be applied to a set of string variables. There are many RegEx engines for u…
    Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now