Search Help
-
Hi!! I just need some help if anyone can please?
I am searching a massive file for this…
4******h&jones.45k
I am using this to search (^[4].*)(h&jones.45k)
but my search brings up all possible results. eg 4*****h&jones.45k or 4h&jones.45k.
I know there is 8 missing characters so how do I return just the ones with 8 missing characters?
Many thanks
Col
-
Sorry I didn’t explain that too well
I am after finding all matches with 8 of any character. So for example…
I get this with (^[4].*)(h&jones.45k)
49l£drh&jones.45k
4kg83&dh&jones.45k
455&h&jones.45k
445675££_h&jones.45kGives me 100s for results
Instead I want… all results like so with all lines with 8 characters after 4 ending with h&jones.45k
487hyCS£lh&jones.45k
4_5_ki!lkh&jones.45k
498Ll!-_6h&jones.45k
487PO4jyYh&jones.45kThanks
Col
-
@Colin-Webster said in Search Help:
8 characters after 4 ending with h&jones.45k
Try:
Find what box:
(?-is)^4.{8}h&jones\.45k
Search mode radiobuttons: selectRegular expression
Learn to answer questions of this kind yourself in the future; start reading HERE and also check out the N++ user manual’s searching section HERE.
EDIT:
After posting originally, I noticed that I should have escaped the literal
.
in the find-what expression – I’ve corrected that in the above. -
Hello, @colin-webster, @alan-kilborn and All,
May be, it’s worth to prefer this search regex :
SEARCH / MARK :
(?-is)^4.{8}h&jones.45k\R
With this syntax, it should be easier to copy or remove these specific lines, if necessary !
Best Regards,
guy038
-
Hi, @colin-webster, @alan-kilborn and All,
@alan-kilborn is right about the escaped dot (
\.
). So, my solution becomes :SEARCH / MARK :
(?-is)^4.{8}h&jones\.45k\R
Cheers,
guy038