A string & a list






A problem in Perl

You have a string & a list
For ex.: $s = "ADbDCdBabc"; @N=("A","D","C")
You should exclude those elements from the string : first by 1 element,
after that by 2 & by 3 ... (If @N would have 5 elements
and by 4 and by 5([$#N+1] elements)), and creating a new list:

by 1:
DbDCdBabc - is excluded A
AbDCdBabc - first D
ADbCdBabc - second D
ADbDdBabc - C
(B doesn't belong to @N list)

by 2:
bDCdBabc - are excluded A,first D
DbCdBabc - A, second D
DbDdBabc - A,C
AbCdBabc - D,D
AbDdBabc - first D,C
ADbdBabc - second D,C

by 3:
bCdBabc - A,first D,second D
bDdBabc - A,first D,C
DbdBabc - A,second D,C

All these elements should be included in new list @Final...
Are there any variants how could I do smth like that ??
And one more thing could u show me variants without using RegEx




---------------------------------------------
This e-mail was sent using Mail.md



.



Relevant Pages

  • Re: Tying check boxes to data
    ... Specifically I want to exclude the column of data that the check box ... Start out by writing a function that builds the string ... When I check one of the check boxes I ... For the first one it will either blank out the entire graph or allow the ...
    (microsoft.public.access.modulesdaovba)
  • Re: A string & a list
    ... You should exclude those elements from the string: ... The array @- is an internal one, storing the offsets of the substrings found by the last regex pattern match. ... The push of the results of the recursive call is qualified by a call to grepto make sure the new value isn't already in the list. ...
    (perl.beginners)
  • Re: Wondering first caracter for each word in the field
    ... What if we need to exclude some word from showing thir first letter through ... From "Ministry of Foreign Affairs" to retreive "MFA" excluding word ... > Public Function Initialize(strIn As String) As String ...
    (microsoft.public.access.formscoding)
  • Re: An already compressed file encoding question
    ... >(Computations courtesy of the Emacs calculator.) ... >> If we call the taken data block, the input group. ... >> possible to exclude certain impossible combinations from the input ... Let's take a sample string with length L from a file with a near ...
    (sci.crypt)
  • Re: Visitor Counter Filter
    ... I want to count the number of visitors to the website but exclude the ... visits by the office staff ... public string determineRunLoc() ... // insert a hitfile record: ...
    (microsoft.public.dotnet.framework.aspnet)