View Single Post
Old 07-22-2013, 07:36 PM   #1550
Jade Aislin
Groupie
Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.
 
Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
Quote:
Originally Posted by JimmXinu View Post
There's a work around for it--'(| )' I think in this case--and it's been discussed in this thread in past. Google will also find various workarounds and comments.
I still seemed to get the unmatched group, but as I was able to get it to work without that, I'll look into this problem later.

Quote:
Originally Posted by JimmXinu View Post
As for streamlining, instead of two lines, one ending in ", " and one with "$", try "(, |$)".

I suspect that combining them into one line with "(, |$)" will help.
That did help. However, I decided not list all the end tags and use (.*?) in my code. Then I added the next end tag and got a strange response in the final ship of the list.

The first line of code works for all other ships. It looks for a word in parenthesis and then places it at the end of the ship.

Code:
 ships_LIST=>\((.*?)\)( )?(.*?),=>\3 (\1),
 ships_LIST=>\((.*?)\)( )?(.*?)$=>\3 (\1)
However the second line, used for the last ship in the list, is moving the parenthesis tag, but it is not getting rid of the original parenthesis. My output goes from 'O (One-Sided) (Family)/P' to 'O (One-Sided) (Family)/P (One-Sided)'.

Is there a reason that the last line of code is moving the tag I want, but is not deleting it from the original position?
Jade Aislin is offline