How to bookmark lines with certain characters in certain positions
-
Re: How to delete lines with missing characters in certain positions
Thanks to this group, I know how to bookmark and then delete lines with missing characters in certain positions. Is there a way to bookmark lines that have certain characters in certain positions? For example, I’m trying to bookmark all lines that have an N in position 39 and a D in position 40.
-
@Brian-Y ,
It’s the same idea as in the post you linked to. The post you linked to wanted to find a space in the 18th character, so it looked for 17 of any character and then one space using
^.{18}\s
You want
ND
in positions 39-40, so you want to look for 38 of any character followed byND
, thus^.{38}ND
----
Useful References
-
Ty for the quick reply…that gives me anything that has an N in position 39. Is there a way to test both positions within the same formula? Position 39 has to be N and Position 40 has to be D.
-
@Brian-Y said in How to bookmark lines with certain characters in certain positions:
that gives me anything that has an N in position 39. Is there a way to test both positions within the same formula? P
The regex I gave does only match if N is 39 and D in 40, as shown in this screenshot below.
-
Gotcha. Thanks so much, that will really help.