Answer the question
In order to leave comments, you need to log in
Your java regex method without pattern?
Hello! At school, they issued a task in which you cannot use the pattern method built into java and you need to create your own regular expression handler. The task is: A parser that uses simple regular expressions entered from the keyboard containing control constructs. – any character, * - 0 or more characters, + - 1 or more characters (a regular expression and a string are entered, the result is the position from which this expression occurs in the text)
Matcher can be used to search in the text. I would be glad for links on the topic of creating your own regular expression handler
Answer the question
In order to leave comments, you need to log in
Regular expressions are equivalent to a state machine. The steps are as follows: find / describe the grammar of regular expressions yourself. According to the grammar, write a parser. Convert regular expression to DFA. Interpret the resulting DFA with a particular input.
https://m.habrahabr.ru/post/166777/
Matcher without Pattern somehow doesn't work, so don't even look in the direction of Matcher.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question