Examples of replaceFirst()


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

        if (m.find()) {
            //field.put("RVRNOS", "");
            field.put("RunwayReports", "No");
            //unit.put("RVRNOS", "");
            unit.put("RunwayReports", "");
            report = m.replaceFirst(" ");
        }

        for (int i = 0; i < 4; i++) {
            //  if( s# R(\d2)(R|L|C)?/(M|P)?(\d1,4)V?(M|P)?(\d1,4)?(FT|N|D)?\s+## )
            m = MP.runway.matcher(report);
View Full Code Here

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

                        field.put(RV + "_Visibility_Range", m.group(4));
                        unit.put(RV + "_Visibility_Range", "");
                    }
                }
                */
                report = m.replaceFirst(" ");
            } else {
                break;
            }
        } // end runway decoding

View Full Code Here

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

                //}
                if (m.group(2) != null) {
                    WX.append( m.group(2) );
                }
                WX.append( m.group(3) );
                report = m.replaceFirst(" ");
            }
            //  if( s#(\+|-|VC|PR| )(MI|BC|DR|BL|SH|TS|FZ)?(BR|FG|FU|VA|DU|SA|HZ|PY)## )
            m = MP.WeatherObs.matcher(report);
            if (m.find()) {
                done = false;
View Full Code Here

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

                //}
                if (m.group(2) != null) {
                    WX.append( m.group(2) );
                }
                WX.append( m.group(3) );
                report = m.replaceFirst(" ");
            }
            // if( s#(\+|-|VC|PR| )(MI|BC|DR|BL|SH|TS|FZ)?(PO|SQ|FC|SS|DS)## )
            m = MP.WeatherOther.matcher(report);
            if (m.find()) {
                done = false;
View Full Code Here

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

                //}
                if (m.group(2) != null) {
                    WX.append( m.group(2) );
                }
                WX.append( m.group(3) );
                report = m.replaceFirst(" ");
            }
            if( done )
                break;
            done = true;
            WX.append( " " );
View Full Code Here

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

        //  $cloud_type[ 0 ] = $1 if( s#(CLR|SKC)\s+## ) ;
        m = MP.CLR_or_SKC.matcher(report);
        if (m.find()) {
            field.put("Cloud_Type", m.group(1));
            unit.put("Cloud_Type", "");
            report = m.replaceFirst(" ");
        }

        //  $vert_VIS = cloud_hgt2_meters( $1 ) if( s#^VV(\d3)\s+## ) ;
        m = MP.vertical_VIS.matcher(report);
        if (m.find()) {
View Full Code Here

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

        //  $vert_VIS = cloud_hgt2_meters( $1 ) if( s#^VV(\d3)\s+## ) ;
        m = MP.vertical_VIS.matcher(report);
        if (m.find()) {
            field.put("Vertical_Visibility", cloud_hgt2_meters(m.group(1)));
            unit.put("Vertical_Visibility", "meters" );
            report = m.replaceFirst(" ");
        }

        //   cloud layers up to 6
        for (int i = 0; i < 6; i++) {
            //    if( s# (\+|-)?(OVC|SCT|FEW|BKN)(\d3)(\w1,3)?\s+## )
View Full Code Here

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

                //  $cloud_phenom[ $i ] = padstr( $4, 4 ) if( $4 ) ;
                if (m.group(4) != null) {
                    field.put(cloud + "_Phenom", m.group(4));
                    unit.put(cloud + "_Phenom", "");
                }
                report = m.replaceFirst(" ");
            } else {
                break;
            }
        } // end clouds
View Full Code Here

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

                    dew_point_temperature *= -1;
                }
                field.put("DewPoint", Float.toString( dew_point_temperature ));
                unit.put("DewPoint", "Celsius");
            }
            remark = m.replaceFirst(" ");

        } else { // check for coarse temperature
            //   get temperature and dew point
            //  if( s#^(M)?(\d2)/(M)?(\d2)?\s+## )
            m = MP.Temperature.matcher(report);
View Full Code Here

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

                       dew_point_temperature *= -1;
                    }
                    field.put("DewPoint", Float.toString( dew_point_temperature ));
                    unit.put("DewPoint", "Celsius");
                }
                report = m.replaceFirst(" ");
            } // end T and TD
        }

        //   get Altimeter settings
        //  if( s# (A|Q)(\d4\.?\d?)\s+## )
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.