Examples of replaceFirst()


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

        if (m.find()) {
            //field.put("SLPNO", "yes");
            //unit.put("SLPNO", "");
            field.put("Sea_Level_Pressure_available", "No");
            unit.put("Sea_Level_Pressure_available", "");           
            remark = m.replaceFirst(" ");
        }

        //if( s# SLP\s?(\d3)\s+## )
        m = MP.SLP.matcher(remark);
        if (m.find()) {
View Full Code Here

Examples of org.apache.commons.lang3.text.StrBuilder.replaceFirst()

    sb.replaceFirst("%blowRate%", df.format(blowRate));
    sb.replaceFirst("%shieldDef%", df.format(shieldDef));
    sb.replaceFirst("%shieldRate%", df.format(shieldRate));
    sb.replaceFirst("%xpRate%", df.format(xpRate));
    sb.replaceFirst("%spRate%", df.format(spRate));
    sb.replaceFirst("%dropRate%", df.format(dropRate));
    sb.replaceFirst("%adenaRate%", df.format(adenaRate));
    sb.replaceFirst("%spoilRate%", df.format(spoilRate));
    sb.replaceFirst("%fireResist%", df.format(fireResist));
    sb.replaceFirst("%windResist%", df.format(windResist));
    sb.replaceFirst("%waterResist%", df.format(waterResist));
View Full Code Here

Examples of org.jostraca.util.RegExp.replaceFirst()

  public void doReplaceRegExpTests( RegExpProvider pREP ) throws Exception {

    RegExp re01 = pREP.make( "a", "b" );
    assertEquals( "b",  re01.replaceAll( "a" ) );
    assertEquals( "bb", re01.replaceAll( "aa" ) );
    assertEquals( "ba", re01.replaceFirst( "aa" ) );
    assertEquals( "xb", re01.replaceFirst( "xa" ) );

    RegExp re02 = pREP.make( "a" );
    assertEquals( "",  re02.replaceAll( "a" ) );
   
View Full Code Here

Examples of org.jregex.Replacer.replaceFirst()

                        String around = Text.getText(arg);
                        pat = new Pattern(Pattern.quote(around));
                    }

                    Replacer r = pat.replacer(repl);
                    String result = r.replaceFirst(initial);

                    return context.runtime.newText(result);
                }
            }));
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.