Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by MaxCarp

  1. MaxCarp

    using regular expressions to extract "adjacent" substrings

    For one thing, I only want to extract the YY..Y part of the string. The regular expression should contain a statement that identifies the variable of type Y by its adjacency to Z, but only returns the Y.
  2. MaxCarp

    using regular expressions to extract "adjacent" substrings

    Actually, I was looking for a regular expression to extract Y...Y (as many consecutive instances of the variable of type Y following Z as there are). Would just =~ /\S+Z(Y+)\g print $1 work (it doesn't in the code). Thanks, Max
  3. MaxCarp

    using regular expressions to extract "adjacent" substrings

    Suppose I have strings of the form: xxxxxxxxxxZYYYxxxxxx where x can be any character, Z is some specific character, and Y is a certain character type (i.e. digits) of arbitrarily length. I want to exploit the fact that substring Y...Y always appears after Z, and write a regular expression that...
  4. MaxCarp

    Regular Expression Question (insertion/substitution)

    Thank you. Sorry for the naive question, but if I understand it correctly, the construct ${1} means taking a single instance of the regular expression and assigning it to the substring ${1}?
  5. MaxCarp

    Regular Expression Question (insertion/substitution)

    Basically, I am trying to construct a substitute expression that accomplishes the following: given all occurrences of a certain type of string (for instance, digits), insert some prefix or suffix before or after all occurences. For example, in the string --12***345)))6789?<>, I want to insert...

Part and Inventory Search

Back
Top