String extraction

Asked 2 years ago, Updated 2 years ago, 43 views

E513-180612001/ET510CU-B1/82419-T/1800/90/18.07.05/FNH450.1

17414179,1,FNH450.1=1/2_BT,01,1800,2168-56-A,ET510CU-B1,1/1,UAP

=======================================================================

Among the two characters above, 1800 numbers and FNH450.1 are common

You want to extract (dark) color for a string from the MFC to see if it matches.

I don't know how to code.

All you have to do is read the matching characters (1800 and FNH450.1) because the characters and numbers keep getting wrong.

I ask for your help me. ㅠ<

string

2022-09-22 19:25

1 Answers

I answered the above string pattern last time, and for the string pattern below, the regex for js will be roughly like this... The problem is that the order in which the two matches appear is different, so you have to separate them into different cases.

How many times do you get wrong when you say, "Let's see If the pattern is not formalized, it is impossible to write a regular expression itself. If you study the conditions for matching those characters on your own, you can write them easily.


2022-09-22 19:25

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.