I am modifying a file to conform to new standards.
I only learnt RegEx for a week many years ago but never got to use it extensively. Therefore I’m seeking a quick solution here. Any one care to help?
–Updates–
Thanks for all your reply, here are more details to the question:
The following is a snapshot of the file
"Qty" "Reference" "Part Name" "PCB DECAL" "Manufacturer" "Description" "Value"
"4" "C37 C67-68" "2.2UF/10V" "C0805" "" "Capacitor" "2.2UF/10V"
"2" "CPL1-2" "CPL" "CPL-250-200-NOVIA" "Anaren" "" "1P510"
"15" "M1-15" "HOLE100" "HOLE100_180" "" "" ""
"4" "L1-2 L5 L7" "IND" "L0603" "" "MOLDED INDUCTOR, 0.5" PIN SPACING" "2.2nH"
"9" "R2 R8 R12 R34-35" "R" "R0603" "" "" "0"
Basically I need to detect all “-” in column 2 that are followed by a number and insert in between the letters that are at the beginning of the word.
Regarding the language, I was actually using Notepad++, thinking the same expressions could at leased by ported to other platforms such as SED if it comes to that.
The regex matches:
Replacement pattern is something like this:
Example in PHP preg: