Click here to Skip to main content
15,904,494 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: A question, very odd some one here might know of answer before I use my Google Fu Pin
Mike Hankey17-Jul-15 4:30
mveMike Hankey17-Jul-15 4:30 
GeneralRe: A question, very odd some one here might know of answer before I use my Google Fu Pin
glennPattonWork317-Jul-15 4:33
professionalglennPattonWork317-Jul-15 4:33 
GeneralRe: A question, very odd some one here might know of answer before I use my Google Fu Pin
OriginalGriff17-Jul-15 4:30
mveOriginalGriff17-Jul-15 4:30 
GeneralRe: A question, very odd some one here might know of answer before I use my Google Fu Pin
glennPattonWork317-Jul-15 4:34
professionalglennPattonWork317-Jul-15 4:34 
GeneralRe: A question, very odd some one here might know of answer before I use my Google Fu Pin
RTek2317-Jul-15 7:18
professionalRTek2317-Jul-15 7:18 
GeneralRe: A question, very odd some one here might know of answer before I use my Google Fu Pin
glennPattonWork317-Jul-15 8:07
professionalglennPattonWork317-Jul-15 8:07 
GeneralRe: A question, very odd some one here might know of answer before I use my Google Fu Pin
RTek2317-Jul-15 10:56
professionalRTek2317-Jul-15 10:56 
QuestionFriday Coding Challenge Pin
chriselst17-Jul-15 0:59
professionalchriselst17-Jul-15 0:59 
Or do my work for me.

Only joking, I have just been presented with a very small issue, just wondering if those of you who like this sort of thing might be able to come up with an elegant solution, just for fun.

I have a field that has a text string in it.

The text string will probably contain an error code, but might not.

The error code, so far as I can tell, will be 2 letters followed by 6 numbers or 3 letters followed by 5 numbers.

The error code, so far as I can tell, will be at the start or the end of the text string.

I need to extract the error code (should it exist) into a new field and the rest of the string into another.

Typing the question has, I believe, shown me the way to proceed.

Bonus credit; I have to do it in xsl.

I shall do it as soon as Eclipse starts working again.

Examples:
<m:StatusMessage xsi:type="xsd:string">Duplicate ContactReference supplied</m:StatusMessage>
<m:StatusMessage xsi:type="xsd:string">ss000073  Invalid value entered in PropertyRef tag</m:StatusMessage>
<m:StatusMessage xsi:type="xsd:string">Exchange Final reading cannot be less than the previous reading - xml00159</m:StatusMessage>

ps, don't you love it when companies apply no standards whatsoever to their work.
pps, if I'm honest I just wanted to complain about the lack of standards
ppps, I think it is due to developers who assume everything they create will be read by a human rather than by a computer
Some men are born mediocre, some men achieve mediocrity, and some men have mediocrity thrust upon them.

AnswerRe: Friday Coding Challenge Pin
OriginalGriff17-Jul-15 1:00
mveOriginalGriff17-Jul-15 1:00 
AnswerRe: Friday Coding Challenge Pin
OriginalGriff17-Jul-15 1:01
mveOriginalGriff17-Jul-15 1:01 
GeneralRe: Friday Coding Challenge Pin
chriselst17-Jul-15 1:07
professionalchriselst17-Jul-15 1:07 
GeneralRe: Friday Coding Challenge Pin
OriginalGriff17-Jul-15 1:09
mveOriginalGriff17-Jul-15 1:09 
GeneralRe: Friday Coding Challenge Pin
TheGreatAndPowerfulOz17-Jul-15 4:34
TheGreatAndPowerfulOz17-Jul-15 4:34 
AnswerRe: Friday Coding Challenge Pin
Nagy Vilmos17-Jul-15 1:14
professionalNagy Vilmos17-Jul-15 1:14 
GeneralRe: Friday Coding Challenge Pin
chriselst17-Jul-15 1:48
professionalchriselst17-Jul-15 1:48 
AnswerRe: Friday Coding Challenge PinPopular
Johnny J.17-Jul-15 1:39
professionalJohnny J.17-Jul-15 1:39 
AnswerRe: Friday Coding Challenge Pin
PIEBALDconsult17-Jul-15 9:07
mvePIEBALDconsult17-Jul-15 9:07 
GeneralGordon Bennett! Some coders... Pin
OriginalGriff16-Jul-15 23:56
mveOriginalGriff16-Jul-15 23:56 
GeneralRe: Gordon Bennett! Some coders... PinPopular
Slacker00717-Jul-15 0:29
professionalSlacker00717-Jul-15 0:29 
GeneralRe: Gordon Bennett! Some coders... Pin
den2k8817-Jul-15 0:32
professionalden2k8817-Jul-15 0:32 
GeneralRe: Gordon Bennett! Some coders... Pin
CPallini17-Jul-15 1:47
mveCPallini17-Jul-15 1:47 
GeneralRe: Gordon Bennett! Some coders... Pin
den2k8817-Jul-15 0:30
professionalden2k8817-Jul-15 0:30 
GeneralRe: Gordon Bennett! Some coders... Pin
  Forogar  17-Jul-15 3:57
professional  Forogar  17-Jul-15 3:57 
GeneralRe: Gordon Bennett! Some coders... Pin
Keith Barrow17-Jul-15 1:08
professionalKeith Barrow17-Jul-15 1:08 
GeneralUOTDQ - Unit of the day quiz Pin
DaveAuld16-Jul-15 23:47
professionalDaveAuld16-Jul-15 23:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.