there are two Pattern as follows
String pattern1 = "A775[0-9A-Z]";
String pattern2 = "A7750|A7756";
how can I use java to determine that the matching range of pattern2 is within the range of pattern1?
Please take a look at it
there are two Pattern as follows
String pattern1 = "A775[0-9A-Z]";
String pattern2 = "A7750|A7756";
how can I use java to determine that the matching range of pattern2 is within the range of pattern1?
Please take a look at it
if you have enough data sample strings, you can compare them with statistical ideas, that is, use these two patterns to match all samples, get two matching result sets, and then compare the result sets with set operations.
traditional methods are difficult to do, and such problems can be solved through in-depth learning and neural network models (you can try google's tensorflow). But there are two difficulties (actually manpower):
when there are enough samples and the model training reaches a certain level, the "network model" has the reasoning of judging whether pairwise regular expressions are included
.there is no easy way to do this, you must parse it yourself. But it's very difficult (it's okay if it's just your example, but it's very difficult if it's universal)
so to speak, it can't be done
.feel [^] and (!?) What s the difference between them? ...
var num = 1234567.89 ; var num1 = num.replace( (?<= d)(?=( d{3})+ b) g, , ); b 1,234,567.89 var num2 = num.replace( (?<= d)(?=( d{3})) g, , ); b 1,2,3,4,567.89 b b ...
I want to extract SyncKey = {"Count": 4,"List": [{"Key": 1,"Val": 694398478},{"Key": 2,"Val": 694398818},{"Key": 3,"Val": 694398792},{"Key": 1000,"Val"...
for example: abdsdsdfsdf1526614206112164350fskdfskdf1526614199681037404bcmvbcvbmcnvz: match 1526614206112164350 and 1526614199681037404 in the string, add quotation marks on both sides, and process it as follows: abdsdsdfsdf "1526614206112164350 " fskdf...
java regular detects whether a string contains characters other than numbers or letters that is, strings can only be letters or numbers, or alphanumeric combinations [ da-zA-Z] it doesn t seem to work this way ...
The requirement is to replace the sensitive words in the HTML document. But I just want to replace plain text, and some html tags contain sensitive words, which I don t want to replace. For example, the src of the img tag contains sensitive words, and ...
convert the level of an inner-table number according to the format. The format is defined as follows (matching the last digits): Type 1 AAAAA (5 hyphens) ABCDEF Type 2 AAAA (4 hyphens, excluding 4) ABCDE Class 3 AAA (3 hyphens, excluding 4) ABCD Cla...