Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Find the position of tags in a sentence

    Assume I have a file with a lot of data sets like

    <a/> My name is <b1> Bill </b1>
    <a/> My name is <b2> John Smith</b2>
    and I only want to find the position of the tags

    the output should be like

    or any similar format like 1;5;7

    Thanks in advance for any help

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Homework? Also, your example output makes no sense. Are you considering end-tags the same as start tags?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts