• ARTICLE
  • STRING
  • CONVERTER
  • ENCRYPT
  • NETWORK
  • MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
  • ARTICLE
    STRING
    CONVERTER
    ENCRYPT
    NETWORK
    MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
logo Online Tools
12 Comments Favorite Copy Link Share

Java Regular Expression Test


Description: Java regular expression online test is implemented based on the  Pattern  class of Oracle JDK version 1.8.0.
Java Regular Expression Test-summary

Java regular expression online testing provides Java regular expression online matching and replacement functions. By controlling parameter settings, you can control the behavior of regular expressions, such as ignoring case, multiline mode, etc.

Java Regular Expression Test-instructions

Java regular expression online testing provides Java regular expression online matching and replacement functions.

  1. Enter the string to match in the input content.
  2. Enter a valid Java regular expression in the regular expression,eg \d+ to match number.
  3. In the Method, select whether to perform regular expression matching or regular expression replacement or regular expression split.When performing replacement, if you do not enter replacement text, it will be replaced with empty.
  4. Enter $0,$1... in the replace text, will reference the group capture content of the regular expression.
  5. The matching at x in the matching result shows the matching times of the regular expression in the string, and each matching is highlighted in the text box.
  6. The match group displays the details of all matches:
    Match Order:Displays the current number of matches, starting from 1
    Group Index:Displays the grouping index in the pattern in the current match, starting from 0. 0 represents the whole pattern
    Begin Index:The starting index of the current match and current grouping in the original string, starting from 0, including the current index
    End Index:The ending index of the current match and current grouping in the original string, starting from 0 and excluding the current index
    Group Match Content:What the current group matches in the original string
  7. In the matching group, up to 1000 rows of records are displayed, and more than 1000 rows are omitted.
  8. You can click the Control Parameters button to set control parameters to control the matching behavior of regular expressions. The control parameters will be stored and remain valid the next time you visit.