Examples of replaceFirst()


Examples of java.util.regex.Matcher.replaceFirst()

            } else {
                // $hectoPasc_ALTIM = $2 ;
                field.put("Altimeter", m.group(2));
                unit.put("Altimeter", "hectopascal");
            }
            report = m.replaceFirst(" ");
        }

        //  $NOSIG = 1 if( s#NOSIG## ) ;
        m = MP.NOSIG.matcher(report);
        if (m.find()) {
View Full Code Here

Examples of java.util.regex.Matcher.replaceFirst()

        //  $FIRST = 1 if( s#FIRST\s+## ) ;
        m = MP.FIRST.matcher(remark);
        if (m.find()) {
            field.put("First_Report_Today", "yes");
            unit.put("First_Report_Today", "");
            remark = m.replaceFirst(" ");
        }

        //   This is last report in observation coverage  LAST
        //  $LAST = 1 if( s#LAST\s+## ) ;
        m = MP.LAST.matcher(remark);
View Full Code Here

Examples of java.util.regex.Matcher.replaceFirst()

        //  $LAST = 1 if( s#LAST\s+## ) ;
        m = MP.LAST.matcher(remark);
        if (m.find()) {
            field.put("Last_Report_Today", "yes");
            unit.put("Last_Report_Today", "");
            remark = m.replaceFirst(" ");
        }

        //   Cloud Types
        //  if( s# 8/(\d|/)(\d|/)(\d|/)\s+# # )
        //    $Cloud_low = $1 ;
View Full Code Here

Examples of java.util.regex.Matcher.replaceFirst()

            }
            if( ! m.group(3).equals( "/")) {
                field.put("Cloud_High", m.group(3));
                unit.put("Cloud_High", "");
            }
            remark = m.replaceFirst(" ");
        }
        //
        //   Snow Increasing Rapidly   SNINCR
        //  if( s#SNINCR (\d1,3)/(\d1,3)\s+## )
        //    $SNINCR = $1 ;
View Full Code Here

Examples of java.util.regex.Matcher.replaceFirst()

        if (m.find()) {
            field.put("Snow_Increasing_Rapidly", m.group(1));
            unit.put("Snow_Increasing_Rapidly", "inches");
            field.put("Snow_Increasing_Depth", m.group(2));
            unit.put("Snow_Increasing_Depth", "inches");
            remark = m.replaceFirst(" ");
        }
        //
        //   Snow depth on ground
        //  if( s#4/(\d1,3)\s+# # )
        //    $SN_depth = $1 ;
View Full Code Here

Examples of java.util.regex.Matcher.replaceFirst()

        //    $SN_depth = $1 ;
        m = MP.snowDepth.matcher(remark);
        if (m.find()) {
            field.put("Snow_Depth", m.group(1));
            unit.put("Snow_Depth", "inches");
            remark = m.replaceFirst(" ");
        }
        //
        //   Water equivalent of snow on ground
        //  $SN_waterequiv = $1 / 10 if( s# 933(\d3)\s+# # ) ;
        m = MP.waterEquiv.matcher(remark);
View Full Code Here

Examples of java.util.regex.Matcher.replaceFirst()

        //  $SN_waterequiv = $1 / 10 if( s# 933(\d3)\s+# # ) ;
        m = MP.waterEquiv.matcher(remark);
        if (m.find()) {
            field.put("Water_Equivalent_of_Snow", Double.toString(Float.parseFloat(m.group(1)) * 0.1 ));
            unit.put("Water_Equivalent_of_Snow", "");
            remark = m.replaceFirst(" ");
        }

        //   Duration of sunshine
        //  if( s# 98(\d1,3|///)\s+# # )
        //    if( $1 eq "///" )
View Full Code Here

Examples of java.util.regex.Matcher.replaceFirst()

                unit.put("Sun_Sensor_working", "");
            } else {
                field.put("Sun_Sensor_Duration", m.group(1));
                unit.put("Sun_Sensor_Duration", "");
            }
            remark = m.replaceFirst(" ");
        }

        //   Precipitation amount
        //  if( s# 6(\d4|////)\s+# # )
        //    $PRECIP_amt = $1 / 100 if( $1 ne "////" ) ;
View Full Code Here

Examples of java.util.regex.Matcher.replaceFirst()

        if (m.find()) {
            if( ! m.group(1).equals("////") ) {
                field.put("Precipitation_amount", Double.toString(Float.parseFloat(m.group(1)) * 0.01 ));
                unit.put("Precipitation_amount", "inches");
            }
            remark = m.replaceFirst(" ");
        }
        //
        //   24 Hour Precipitation amount
        //  if( s# 7(\d4|////)\s+# # )
        //    $PRECIP_24_amt = $1 / 100 if( $1 ne "////" ) ;
View Full Code Here

Examples of java.util.regex.Matcher.replaceFirst()

        if (m.find()) {
            if( ! m.group(1).equals("////") ) {
                field.put("Precipitation_amount_24Hours", Double.toString(Float.parseFloat(m.group(1)) * 0.01 ));
                unit.put("Precipitation_amount_24Hours", "inches");
            }
            remark = m.replaceFirst(" ");
        }
        //
        //   Maximum Temperature
        //  if( s# 1(0|1|/)(\d3|///)\s+# # )
        //    $Tmax = $2 / 10 if( $2 ne "///" ) ;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.