Show
Ignore:
Timestamp:
11/21/09 22:23:07 (2 years ago)
Author:
yabuki
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/myweb/src/mypackage/StringTest.java

    r33 r52  
    1313    String str="<h3>文字列</h3><p>文字列を扱うには(中略)</p>" 
    1414              +"<H3>正規表現</h3><P>先に説明したStringや\n(後略)</p>"; 
    15     Pattern p=Pattern.compile("(?i:<h3>.*?</h3>)"); 
     15    //Pattern p=Pattern.compile("(?i:<h3>.*?</h3>)"); 
     16    //Pattern p=Pattern.compile("(?is:<p>.*?</p>)"); 
     17    Pattern p=Pattern.compile("(<p>.*?</p>)",Pattern.CASE_INSENSITIVE|Pattern.DOTALL); 
    1618    Matcher m=p.matcher(str); 
    1719    while (m.find()) System.out.println(m.group());