Package java.util.regex

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


                    var2 = Float.parseFloat(m.group(5));
                    var3 = Float.parseFloat(m.group(6));
                    var1 = var1 + (var2 / var3);
                    field.put("Variable_Visibility_Max", Float.toString(var1));
                    unit.put("Variable_Visibility_Max", "miles");
                    remark = m.replaceFirst(" ");
                    // elsif( s#(VIS|VSBY) (\d1,3) (\d1,2)/(\d1,2)V(\d1,3)\s+## )
                    //   $VISmin = $2 + ( $3 / $4 ) ;
                    //   $VISmax = $5 ;
                } else {
                    m = MP.variableVisibility4.matcher(remark);
View Full Code Here


                        var1 = var1 + (var2 / var3);
                        field.put("Variable_Visibility_Min", Float.toString(var1));
                        unit.put("Variable_Visibility_Min", "miles");
                        field.put("Variable_Visibility_Max", m.group(5));
                        unit.put("Variable_Visibility_Max", "miles");
                        remark = m.replaceFirst(" ");
                        // elsif( s#(VIS|VSBY) (\d1,3)V(\d1,3)\s+## )
                        //   $VISmin = $2 ;
                        //   $VISmax = $3 ;
                    } else {
                        m = MP.variableVisibility5.matcher(remark);
View Full Code Here

                        if (m.find()) {
                            field.put("Variable_Visibility_Min", m.group(2));
                            unit.put("Variable_Visibility_Min", "miles");
                            field.put("Variable_Visibility_Max", m.group(3));
                            unit.put("Variable_Visibility_Max", "miles");
                            remark = m.replaceFirst(" ");
                            // elsif( s#(VIS|VSBY) (\d1,2)/(\d1,2)V(\d1,3)\s+## )
                            //   $VISmin = ( $2 / $3 ) ;
                            //   $VISmax = $4 ;
                        } else {
                            m = MP.variableVisibility6.matcher(remark);
View Full Code Here

                                var1 = var1 / var2;
                                field.put("Variable_Visibility_Min", Float.toString(var1));
                                unit.put("Variable_Visibility_Min", "miles");
                                field.put("Variable_Visibility_Max", m.group(4));
                                unit.put("Variable_Visibility_Max", "miles");
                                remark = m.replaceFirst(" ");
                            }
                        }
                    }
                }
            }
View Full Code Here

            var1 = var1 + (var2 / var3);
            field.put("Second_Site_Visibility", Float.toString(var1));
            unit.put("Second_Site_Visibility", "miles");
            field.put("Second_Site_Location", m.group(5));
            unit.put("Second_Site_Location", "");
            remark = m.replaceFirst(" ");
            //   elsif( s#(VIS|VSBY) (\d1,3) (RY\d1,2)\s+## )
            //    $VIS_2ndSite = $2 ;
            //    $VIS_2ndSite_LOC = padstr( $3, 10 ) ;
        } else {
            m = MP.Visibility2ndSite2.matcher(remark);
View Full Code Here

            if (m.find()) {
                field.put("Second_Site_Visibility", m.group(2));
                unit.put("Second_Site_Visibility", "miles");
                field.put("Second_Site_Location", m.group(3));
                unit.put("Second_Site_Location", "");
                remark = m.replaceFirst(" ");
                // elsif( s#(VIS|VSBY) (\d1,2)/(\d1,2) (RY\d1,2)\s+## )
                //   $VIS_2ndSite = ( $2 / $3 ) ;
                //   $VIS_2ndSite_LOC = padstr( $4, 10 ) ;
            } else {
                m = MP.Visibility2ndSite3.matcher(remark);
View Full Code Here

                    var1 = var1 / var2;
                    field.put("Second_Site_Visibility", Float.toString(var1));
                    unit.put("Second_Site_Visibility", "miles");
                    field.put("Second_Site_Location", m.group(4));
                    unit.put("Second_Site_Location", "");
                    remark = m.replaceFirst(" ");
                }
            }
        } // end Second site visiblity

/* let lighning go to extra fields cuz convnetion not followed
View Full Code Here

        if (m.find()) {
            field.put("Ceiling_Min", Integer.toString(Integer.parseInt(m.group(1)) * 100));
            unit.put("Ceiling_Min", "feet");
            field.put("Ceiling_Max", Integer.toString(Integer.parseInt(m.group(2)) * 100));
          unit.put("Ceiling_Max", "feet");
            remark = m.replaceFirst(" ");
        }

        //   ? about SKY condition at 2nd location
        //   get 2nd site ceiling and location
        //  if( s#CIG (\d3) (RY\d1,2)\s+## )
View Full Code Here

            var1 = Float.parseFloat(m.group(1)) * 10;
            field.put("Second_Site_Sky", Float.toString(var1));
            unit.put("Second_Site_Sky", "feet");
            field.put("Second_Site_Sky_Location", m.group(2));
            unit.put("Second_Site_Sky_Location", "");
            remark = m.replaceFirst(" ");
        }

        //   Presure falling rapidly
        //  $PRESFR = 1 if( s#PRESFR/?\s+## ) ;
        m = MP.PRESFR.matcher(remark);
View Full Code Here

        //  $PRESFR = 1 if( s#PRESFR/?\s+## ) ;
        m = MP.PRESFR.matcher(remark);
        if (m.find()) {
            field.put("Pressure_Falling_Rapidly", "Yes");
            unit.put("Pressure_Falling_Rapidly", "");
            remark = m.replaceFirst(" ");
        }

        //   Presure rising rapidly
        //  $PRESRR = 1 if( s#PRESRR/?\s+## ) ;
        m = MP.PRESRR.matcher(remark);
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.