09-28-2016 01:48 PM - edited 09-28-2016 01:50 PM
Ok thanks for the help Bill, Kudos coming your way soon!
Anyone else have any ideas to help me with my RegEx or Search and Replace Pattern problem (see previous posts for problem)?
Thanks for any help!
SM
09-28-2016 01:52 PM
09-28-2016 01:55 PM
Ben,
Thanks for the reply. I have LV 2013 though... Is there a way you can make that 2013 compatible?
Thanks,
SM
09-30-2016 08:48 AM
Ben,
Thanks for the reply, works brilliantly.
First, I tried to repeat that same process to eliminate multiple decimal places (see attached), and it didn't really work.
Second, can you kind of explain to me the syntax for that? For instance, was does the "+" mean in the search section. For example the one with the negative sign, does the "-+" in the search portion, does it mean it's looking for more than one "-" sign?
Thanks,
SM
09-30-2016 08:53 AM
@Sman29 wrote:Ben,
Thanks for the reply, works brilliantly.
First, I tried to repeat that same process to eliminate multiple decimal places (see attached), and it didn't really work.
Second, can you kind of explain to me the syntax for that? For instance, was does the "+" mean in the search section. For example the one with the negative sign, does the "-+" in the search portion, does it mean it's looking for more than one "-" sign?
Thanks,
SM
Yes, in a regex the "+" means one or more consecutive occurence, for a litteral + sign you need to add an escape character: \+ (\++ thus mean or or more plus sign).
Ben64
09-30-2016 08:58 AM
Ben,
Ok, that makes sense. Do you know why the "." section won't work correctly? Please see attached screen shot. Also, is there a way to combine all those Search Patterns so I don't have to have so many?
And is there a way to check for additional tilde's outside the brackets? Or a non-tilde character?
Thanks for the help,
SM
09-30-2016 09:07 AM
Ok I got the decimal place working, I had to do the "\." Still though, is there a way to combine the searches so I don't have so many? Also, is there a way to check for additional tilde's outside the brackets? Or a non-tilde character?
Thanks for the help,
SM
09-30-2016 09:11 AM
09-30-2016 10:18 AM
Gotcha. Is there a way to look for multiple tilde's outside the brackets, or non-tilde characters outside the brackets?
Thanks,
SM
09-30-2016 10:53 AM - edited 09-30-2016 11:19 AM
I figured out the non-tilde's outside the brackets, just did [~~] and that matches any non tilde character. Attached is a screenshot of my parsing code as of now.
Is there any way at all to check the pattern and notice that if a bracket is missing, it will automatically place a bracket there?
EDIT:
Also, is there a way to make a non-numeric entry a 0? For example, if I input: "[100~BadCharacter~300]" the output would be: "[100~0~300]". Right now if I do this the output looks like this: "[100~~300]". I can't really just say replace with a 0 because if I input: "[100~Bad123Charac123ter~300]" the output would be: "[100~000123000000123000~300]" and that is just a huge number. Can I check if there is like a string only with no numbers in between?
Thanks,
SM