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}\sYou want
NDin 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login