RegEx to return 1 or 0 whether the tested value is empty

  • Thread starter Thread starter Robson Siqueira
  • Start date Start date
R

Robson Siqueira

Guys,

I have a need of replacing the content of the tested value with 1 or 0,
depending if the value has content or not. 1 for value, 0 for empty. I would
like to accomplish this thru a regular expression. Does somebody have an
idea on how to do this?

Regards,

Robson Siqueira
 
Robson Siqueira said:
I have a need of replacing the content of the tested value with 1 or 0,
depending if the value has content or not. 1 for value, 0 for empty. I would
like to accomplish this thru a regular expression. Does somebody have an
idea on how to do this?

I'm not sure I entirely follow - could you give an example of how you'd
like it to look. Also, it doesn't sound like a regular expression is a
particularly natural solution - could you explain why you want to use
one?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top