Hello,
may I ask here for help making the right search pattern.
I'm using findstr.exe (Windows 7).
Text which I like to find in a huge textflile looks like:
: A_BmwThZel_f (123.456) /* sfssfsfsfsf */
or
A_BmwThZel2_f ( -123.0) /* */
or
A_BmwThresholfForSpeedCal_f (3.00023456789) gggg_rrr---ii
Text between A_ and _f may be any letter (capital or not) and number 0-9
Preceeding of A_???_f there might be one ore more blanks or other special signs (like
on the right side, between A_???_f and opening bracket ( there might be one ore more spaces. After the closing bracket ) ther might be spaces or other charachters.
Within the brackets () there are numbers, with dot . Values may be negative.
Any idea how to achieve an appropriate regex pattern which works with findstr.exe?
Thanks for any hint.
Please help creating search pattern (for findstr.exe)
Moderator: DosItHelp
Re: Please help creating search pattern (for findstr.exe)
Code: Select all
findstr "\<A_[A-Za-z0-9][A-Za-z0-9]*_f[ ]*([ ]*[-]*[0-9.][0-9.]*[ ]*)" "test.txt"
Note that FINDSTR always outputs the entire line where the pattern was found.
Steffen
Re: Please help creating search pattern (for findstr.exe)
aGerman wrote:Code: Select all
findstr "\<A_[A-Za-z0-9][A-Za-z0-9]*_f[ ]*([ ]*[-]*[0-9.][0-9.]*[ ]*)" "test.txt"
Note that FINDSTR always outputs the entire line where the pattern was found.
Steffen
Thanks !