Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6159639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:09:58+00:00 2026-05-23T21:09:58+00:00

This regular expression is not finding any matches. In other languages I run it

  • 0

This regular expression is not finding any matches. In other languages I run it in, it works great. In online regular expression testers like rubular.com it works great.

In java, it does not work.

What is different about java regular expressions that they break things like this?

Why doesn’t it work? Furthermore, how can I figure out in the future why they wont match?

sample data

<link>http://www.wunderground.com/US/MI/Milan.html</link>
<description><![CDATA[Temperature: 89.4&deg;F | Humidity: 62% | Pressure: 29.65in      (Steady) | Conditions: Clear | Wind Direction: NW | Wind Speed: 1.6mph<img     src="http://server.as5000.com/AS5000/adserver/image?ID=WUND-00070&C=0" width="0" height="0"     border="0"/>]]>
</description>

and the code

protected void parseTemperature()
{

    Pattern p = Pattern.compile("/Temperature: ([0-9.]+)&deg/");
    Matcher m = p.matcher(this.xml);

    if (m.find())
    {
         this.temperature = Double.valueOf(m.group(1));
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:09:59+00:00Added an answer on May 23, 2026 at 9:09 pm

    Remove the / characters surrounding the regex.

    Pattern.compile takes a raw expression, not wrapped in /s.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a regular expression that looks something like this: a(|bc) this expression matches
How can I update this regular expression to find and replace not just /news/
I have this Regular Expression that matches the following strings: <!-- 09-02-2009 ---> <!--
Here's the problem: split=re.compile('\\W*') This regular expression works fine when dealing with regular words,
I need help decoding this regular expression from sprockets. I am not sure what
Why does the following regular expression not match this text? Text: Der Prozess kann
I want to match 1234 5678 or 12345678 Is this regular expression wrong? if(!number.matches(^\\d{4}[,
Why isn't this regular expression working? A correct email address does not pass the
How Can I forbid repeated characters using regular Expression? This regular Expression should not
Why is this regular expression not working? Console.WriteLine(Regex.IsMatch(password, (?!^[a-zA-Z]*$))); As you can see the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.