Create a global regular expression that matches three-letter words : Match : Regular Expressions Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Regular Expressions » Match »

 

Create a global regular expression that matches three-letter words


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var regex:RegExp = /b[a-z]{3}b/g;
        var sentence:String = "This string has two three letter words.";
        tracesentence.searchregex ) );
        traceregex.lastIndex );
        tracesentence.searchregex ) );
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Regular Expressions
» Match