Link to home
Start Free TrialLog in
Avatar of justin_smith
justin_smithFlag for Australia

asked on

IF/Else logic in Regular Expression

Hi

I am facing situation where i need create the logic that is similar to a ternary operator.

I dont have the freedom to use any mainstream languages.

This is what i need to do

If something is blank do this other something else

THanks

Theepan
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What non-mainstream  languages do you have the freedom to use?
what do you want to do if something is blank?  what do you want to do if not?
regular expressions themselves don't really do anything other than match or not match
sometimes other languages may use the matching result from the language described by the regular expression to do something like substitute the string that was matched.
Avatar of justin_smith

ASKER

ozo,

i can only put regex into a third party interface.. this accept regex..

Ok this is what i want to do..

If variable CONFIG is blank variable MESSAGE should be assigned the text BLANK else FULL

This is not exactly what i want to do..

But logic is easily ported

Thanks

Theepan
Does this third party interface that accepts regular expressions have a means for specifying which variables to test and assign?
Does this interface return anything that you can them use to do an assignment yourself?
It is not so much developer friendly..

But i can see what is eventually assigned by getting an SMS..

If you could structure the Regex i might be able to tweak it according the way the thirdparty interface works.. hopefully

Thanks

another discussion here
http://www.omegacoder.com/?p=56


what flavor of regexp do you need to use?