Regex.hx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package java.util.regex;
  2. import java.NativeArray;
  3. extern class Pattern
  4. {
  5. static function compile(regex:String, flags:Int):Pattern;
  6. function matcher(input:String):Matcher;
  7. function split(input:String):NativeArray<String>;
  8. static var CANON_EQ(default, null):Int;
  9. static var CASE_INSENSITIVE(default, null):Int;
  10. static var COMMENTS(default, null):Int;
  11. static var DOTALL(default, null):Int;
  12. static var MULTILINE(default, null):Int;
  13. static var UNICODE_CASE(default, null):Int;
  14. static var UNIX_LINES (default, null):Int;
  15. }
  16. extern interface MatchResult
  17. {
  18. @:overload(function(group:Int):Int {})
  19. function end():Int;
  20. @:overload(function():String {})
  21. function group(group:Int):String;
  22. function groupCount():Int;
  23. @:overload(function(group:Int):Int {})
  24. function start():Int;
  25. }
  26. extern class Matcher implements MatchResult
  27. {
  28. function reset(input:String):Matcher;
  29. @:overload(function(group:Int):Int {})
  30. function end():Int;
  31. @:overload(function():String {})
  32. function group(group:Int):String;
  33. function groupCount():Int;
  34. @:overload(function(group:Int):Int {})
  35. function start():Int;
  36. function find():Bool;
  37. function replaceAll(replacement:String):String;
  38. function pattern():Pattern;
  39. }