Java Regex - Match Any Part of Regular Expression -
Consider a vague regex such as [az] {0}} [az] {0}
. It will match the strings like abcdefgh
. I am adding additional elements to this regedx and I want to be able to test it for several different parts of regex.
For [az] {0} f [az] {2} e [AG] {0,5}
it will match the face
But I also test string to match [az] {0}}
or f [az] {2} e
or [az] Want to {0,3} f [az] {2} e
or f [az] {2} e [az] {0,5}
, but such order does not mess up Is doing e [az] {0,5} f
. To keep it more easily: I have a master reggae that I want to try to test against different strings. But not only do I want to test the whole regex, but I also want to test the part of each person to see that the string can fit somewhere inside.
I can not input manually only different regex possibilities because they are produced in other ways that are executed and are separated each time, but will always follow the same normal format: 0 Some finite numbers, one or more letters, a specific number sheet, can fill the "difference", there is a limit to the letters other than this time, etc.
I have really spent hours and trying different bits code to divide the regex and split each, then mix some partitions to make each possibility. Eventually I bowed before the challenge and decided to seek help. It is very difficult to describe what I am trying to do, so I hope I have done a great job. Please bear with me
It seems that you are trying to develop some complex regex?
My advice is to get a text editor that will highlight matches in real time, and will be a Pearl-compatible Reggae engine.
I use myself, regex find on ( Ctrl + f , then alt + r ).
I will record all the cases I want to match in the text area. For example
My regex book is
< Strong> edit : The linked RE.txt doctor is seen dead so I keep an eye on a github treatise:
Alternatively < / H2>
It may be that whatever you are trying to do is not conducive to regex. It seems that you are trying to match partial terms or trying to select the best match.
Perhaps you should check more fine grain logic and substrings, character indexing.
Disclaimer: I do not think I have a lawsuit against you or your question
Comments
Post a Comment