in reply to Re^2: Passing a regex from a CGI HTML form
in thread Passing a regex from a CGI HTML form
OK, seeing as I am 57 in a few months, looks like a lot of people are protecting me ;)
Here follows 2 examples of the junk I need to format:
SWA vs CHE GK WBA @ BOU GK
That is easy to parse and render clean, as all I need is to extract is "SWA,GK" or "WBA,GK" in that example:
$line =~ s/ vs ... /,/; $line =~ s/ \@ ... /,/;
Now, the 'vs' and '@' are (seem) randomly dispersed ~ whether that is a product of the newspapers website database or crappy programming, I don't know.
But this week, this appeared in about 50 places over 4000 lines:
EVE GK
OK, my code failed on this. I could see what has happened, but couldn't fix it at work. If I did have a debug option to pass over a new regex, I could send a '$line =~ s/ GK/,GK/;' which would have fixed it up until I got home (as it was, I frigged around in a spreadsheet to correct it to keep the wolves at bay).
Nick
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Passing a regex from a CGI HTML form [EXAMPLE DATA]
by stevieb (Canon) on Aug 31, 2016 at 19:47 UTC | |
by Linicks (Scribe) on Aug 31, 2016 at 20:04 UTC |