Hello All,
I have a file which contains the below contains
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_conditional_switches.h 1.7.1.1 d:\Sandbox\SCS_Core_Based\ABS\ABS_GEN1\MAIN\APPLICATION\abs_axle_behavior\abs_conditional_switches.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_constants.h 1.7.1.4 d:\Sandbox\SCS_Core_Based\ABS\ABS_GEN1\MAIN\APPLICATION\abs_axle_behavior\abs_constants.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_functions.h 1.5.1.1 d:\Sandbox\SCS_Core_Based\ABS\ABS_GEN1\MAIN\APPLICATION\abs_axle_behavior\abs_functions.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_code_operation_time.c 1.2 d:\Sandbox\SCS_Core_Based\ABS\ABS_GEN1\MAIN\APPLICATION\abs_code_operation_time\abs_code_operation_time.c
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_conditional_switches.h 1.7.1.1 d:\Sandbox\SCS_Core_Based\ABS\ABS_GEN1\MAIN\APPLICATION\abs_code_operation_time\abs_conditional_switches.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_constants.h 1.7.1.4 d:\Sandbox\SCS_Core_Based\ABS\ABS_GEN1\MAIN\APPLICATION\abs_code_operation_time\abs_constants.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_functions.h 1.5.1.1 d:\Sandbox\SCS_Core_Based\ABS\ABS_GEN1\MAIN\APPLICATION\abs_code_operation_time\abs_functions.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_conditional_switches.h 1.8.1.1 d:\Sandbox\BMW35UP_I390_1.443_Testview\MainMicro\Application\Abs\Abs_Main\_abs_axle_behavior\abs_conditional_switches.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_constants.h 1.8.3.2 d:\Sandbox\BMW35UP_I390_1.443_Testview\MainMicro\Application\Abs\Abs_Main\_abs_axle_behavior\abs_constants.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_functions.h 1.6 d:\Sandbox\BMW35UP_I390_1.443_Testview\MainMicro\Application\Abs\Abs_Main\_abs_axle_behavior\abs_functions.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_code_operation_time.c 1.2 d:\Sandbox\BMW35UP_I390_1.443_Testview\MainMicro\Application\Abs\Abs_Main\_abs_code_operation_time\abs_code_operation_time.c
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_conditional_switches.h 1.8.1.1 d:\Sandbox\BMW35UP_I390_1.443_Testview\MainMicro\Application\Abs\Abs_Main\_abs_code_operation_time\abs_conditional_switches.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_constants.h 1.8.3.2 d:\Sandbox\BMW35UP_I390_1.443_Testview\MainMicro\Application\Abs\Abs_Main\_abs_code_operation_time\abs_constants.h
/SCS/SCS_Core_Based/08_Software/Application/ABS/ABS_GEN1/MAIN/APPLICATION/SOURCE/abs_functions.h 1.6 d:\Sandbox\BMW35UP_I390_1.443_Testview\MainMicro\Application\Abs\Abs_Main\_abs_code_operation_time\abs_functions.h
for the above contents after loading the file in the container if i give the input has "\abs_axle_behavior\" i need to get all the lines which contains "\abs_axle_behavior\" and "\_abs_axle_behavior\" using regular expression kindly help me with this.
Kindly help me with the regular expression.
Thanks & Regards,
Sampath
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Dec 4, 2014, 9:23 AM
Here's the same code in VB.NET:
sampath mekaPosted Dec 5, 2014, 1:44 AM
I have changed and tried its working fine Thanks for your help.If i have any more queries i will get back..
Thanks & Regards,
Sampath
sampath mekaPosted Dec 5, 2014, 1:23 AM
your answer is correct but the provided files are very huge files which contains more than 30,000 lines so i need to get all the lines with matches for the expression.I have done some code in vbs which i will provided .In this i am reading all lines from a file to container (readAllTestview)
search= "\abs_axle_behavior\"
lentxt= Len(search)
Set reg = New RegExp
reg.MultiLine = True
reg.Global = True
regExpBuildview ="\_?" + search + "\"
reg.Pattern =regExpBuildview
For Each m In mc
MsgBox m.Value
msgbox mc.count
Next
I implemented the expression in vbscript but this is not working.
here what i should get mc.count is total matches m.Value is the entire line.
The output should be same but expression should be implemented to entire file.
Sorry to trouble you this should work in vbscript.
Thanks & Regards
Sampath
VulpesPosted Dec 4, 2014, 9:10 AM
The output is: