Re: TeraScript-Talk: Remove non-alphanumeric characters

2018-07-19 Thread Wayne Irvine
That is awesome! I wasn’t aware of KEEP and suspect it will do what I need.

Thanks also for the explanation on REGEX. I wondered why I couldn’t get it to 
work.

Wayne

> On 20 Jul 2018, at 7:17 am, Robert Shubert  wrote:
>
> Before we get into the regex, @KEEP might be an option:
>
> <@! "remove everything but letters and numbers">
> <@KEEP <@ARG input> abcdefghijklmnopqrstuvwxyz1234567890>
>
> Regex in @REPLACE works a little differently than what the SO article says. I 
> adapted one of the answers to this:
>
> <@REPLACE <@ARG input> findstr="[^0-9a-zA-Z]" replacestr="" type="regex">
>
> Lastly, there's an easy way to use the bit of JavaScript right from the SO 
> answer, which you can run server-side:
>
> <@SCRIPT expr='"<@ARG input encoding=javascript>".replace(/\W/g, "")'>
>
> Robert
>
> -Original Message-----
> From: Wayne Irvine [mailto:wa...@byteserve.com.au]
> Sent: Wednesday, July 18, 2018 7:21 PM
> To: TeraScript-Talk@terascript.com
> Subject: TeraScript-Talk: Remove non-alphanumeric characters
>
> I have a situation where users might type in a string and I need to make a 
> simple alphanumeric code from it.
>
> Previously I’ve used a bunch of REPLACE statements, but you can never 
> underestimate fools. ;)
>
> I’m playing around with REGEX (again) and as usual, it has me stumped. I 
> would like to code a simple REGEX (oxymoron) statement that will take a 
> string of characters and return either a string with only alphanumerics and 
> spaces, or an array of strings with only alphanumerics.
>
> Wayne
>
> Byteserve Pty Ltd
> w: http://www.byteserve.com.au/
> e: i...@byteserve.com.au
> p: +61 02 9960 6099
> m: 0409 960 609
> f: +61 02 9960 6088
>
>
>
>
> 
>
> To unsubscribe from this list, please send an email to 
> lists...@terascript.com with "unsubscribe terascript-talk" in the body.
>
>
>
>
> 
>
> To unsubscribe from this list, please send an email to 
> lists...@terascript.com with "unsubscribe terascript-talk" in the body.
>

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



RE: TeraScript-Talk: Remove non-alphanumeric characters

2018-07-19 Thread Robert Shubert
Before we get into the regex, @KEEP might be an option:

<@! "remove everything but letters and numbers">
<@KEEP <@ARG input> abcdefghijklmnopqrstuvwxyz1234567890>

Regex in @REPLACE works a little differently than what the SO article says. I 
adapted one of the answers to this:

<@REPLACE <@ARG input> findstr="[^0-9a-zA-Z]" replacestr="" type="regex">

Lastly, there's an easy way to use the bit of JavaScript right from the SO 
answer, which you can run server-side:

<@SCRIPT expr='"<@ARG input encoding=javascript>".replace(/\W/g, "")'>

Robert

-Original Message-
From: Wayne Irvine [mailto:wa...@byteserve.com.au]
Sent: Wednesday, July 18, 2018 7:21 PM
To: TeraScript-Talk@terascript.com
Subject: TeraScript-Talk: Remove non-alphanumeric characters

I have a situation where users might type in a string and I need to make a 
simple alphanumeric code from it.

Previously I’ve used a bunch of REPLACE statements, but you can never 
underestimate fools. ;)

I’m playing around with REGEX (again) and as usual, it has me stumped. I would 
like to code a simple REGEX (oxymoron) statement that will take a string of 
characters and return either a string with only alphanumerics and spaces, or an 
array of strings with only alphanumerics.

Wayne

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



Re: TeraScript-Talk: Remove non-alphanumeric characters

2018-07-19 Thread Peter Dobbs
The regex pattern of terascript should be identical to the JavaScript pattern.

https://regexr.com/


Peter Dobbs
President | ENGINESS | P: 416.901.6151 | F: 
416.901.6150 | www.enginess.io

[cid:]

This email and any attachments are confidential and are intended only for the 
person(s) to whom it is addressed. It you are not the addressee named above, 
any use, copying, distribution or disclosure is strictly unauthorized. If you 
have received this information in error, please delete it and any attachments 
and notify me immediately.


On Jul 19, 2018, at 12:25 AM, Wayne Irvine 
mailto:wa...@byteserve.com.au>> wrote:

Because I am interested in the Terascript implementation of REGEX.

Wayne

On 19 Jul 2018, at 2:02 pm, Peter Dobbs 
mailto:pe...@enginess.io>> wrote:

Why not implement in JavaScript and bounce any requests that don’t comply?


Peter Dobbs
President | ENGINESS | P: 416.901.6151 | F: 
416.901.6150 | www.enginess.io

[cid:]

This email and any attachments are confidential and are intended only for the 
person(s) to whom it is addressed. It you are not the addressee named above, 
any use, copying, distribution or disclosure is strictly unauthorized. If you 
have received this information in error, please delete it and any attachments 
and notify me immediately.


On Jul 18, 2018, at 11:24 PM, Wayne Irvine 
mailto:wa...@byteserve.com.au>> wrote:

Cheers. I was viewing this exact StackOverflow article prior to submitting my 
question.

The question is more on implementing the REGEX statement in terascript, than 
the actual REGEx statement.

Wayne

On 19 Jul 2018, at 12:55 pm, Peter Dobbs 
mailto:pe...@enginess.io>> wrote:

https://stackoverflow.com/questions/9364400/remove-not-alphanumeric-characters-from-string-having-trouble-with-the-char


Peter Dobbs
President | ENGINESS | P: 416.901.6151 | F: 
416.901.6150 | www.enginess.io



This email and any attachments are confidential and are intended only for the 
person(s) to whom it is addressed. It you are not the addressee named above, 
any use, copying, distribution or disclosure is strictly unauthorized. If you 
have received this information in error, please delete it and any attachments 
and notify me immediately.


On Jul 18, 2018, at 10:19 PM, Wayne Irvine 
mailto:wa...@byteserve.com.au>> wrote:

I have a situation where users might type in a string and I need to make a 
simple alphanumeric code from it.

Previously I’ve used a bunch of REPLACE statements, but you can never 
underestimate fools. ;)

I’m playing around with REGEX (again) and as usual, it has me stumped. I would 
like to code a simple REGEX (oxymoron) statement that will take a string of 
characters and return either a string with only alphanumerics and spaces, or an 
array of strings with only alphanumerics.

Wayne

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to 
lists...@terascript.com with "unsubscribe 
terascript-talk" in the body.



To unsubscribe from this list, please send an email to 
lists...@terascript.com with "unsubscribe 
terascript-talk" in the body.

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088



To unsubscribe from this list, please send an email to 
lists...@terascript.com with "unsubscribe 
terascript-talk" in the body.


To unsubscribe from this list, please send an email to 
lists...@terascript.com with "unsubscribe 
terascript-talk" in the body.

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088



To unsubscribe from this list, please send an email to 
lists...@terascript.com with "unsubscribe 
terascript-talk" in the body.




To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


Re: TeraScript-Talk: Remove non-alphanumeric characters

2018-07-18 Thread Wayne Irvine
Because I am interested in the Terascript implementation of REGEX.

Wayne

> On 19 Jul 2018, at 2:02 pm, Peter Dobbs  wrote:
>
> Why not implement in JavaScript and bounce any requests that don’t comply?
>
>
> Peter Dobbs
> President | ENGINESS | P: 416.901.6151  | F: 
> 416.901.6150  | www.enginess.io 
>
>
>
> This email and any attachments are confidential and are intended only for the 
> person(s) to whom it is addressed. It you are not the addressee named above, 
> any use, copying, distribution or disclosure is strictly unauthorized. If you 
> have received this information in error, please delete it and any attachments 
> and notify me immediately.
>
>
> On Jul 18, 2018, at 11:24 PM, Wayne Irvine  > wrote:
>
>> Cheers. I was viewing this exact StackOverflow article prior to submitting 
>> my question.
>>
>> The question is more on implementing the REGEX statement in terascript, than 
>> the actual REGEx statement.
>>
>> Wayne
>>
>>> On 19 Jul 2018, at 12:55 pm, Peter Dobbs >> > wrote:
>>>
>>> https://stackoverflow.com/questions/9364400/remove-not-alphanumeric-characters-from-string-having-trouble-with-the-char
>>>  
>>> 
>>>
>>>
>>> Peter Dobbs
>>> President | ENGINESS | P: 416.901.6151  | F: 
>>> 416.901.6150  | www.enginess.io 
>>> 
>>>
>>>
>>>
>>> This email and any attachments are confidential and are intended only for 
>>> the person(s) to whom it is addressed. It you are not the addressee named 
>>> above, any use, copying, distribution or disclosure is strictly 
>>> unauthorized. If you have received this information in error, please delete 
>>> it and any attachments and notify me immediately.
>>>
>>>
>>> On Jul 18, 2018, at 10:19 PM, Wayne Irvine >> > wrote:
>>>
 I have a situation where users might type in a string and I need to make a 
 simple alphanumeric code from it.

 Previously I’ve used a bunch of REPLACE statements, but you can never 
 underestimate fools. ;)

 I’m playing around with REGEX (again) and as usual, it has me stumped. I 
 would like to code a simple REGEX (oxymoron) statement that will take a 
 string of characters and return either a string with only alphanumerics 
 and spaces, or an array of strings with only alphanumerics.

 Wayne

 Byteserve Pty Ltd
 w: http://www.byteserve.com.au/ 
 e: i...@byteserve.com.au 
 p: +61 02 9960 6099
 m: 0409 960 609
 f: +61 02 9960 6088




 

 To unsubscribe from this list, please send an email to 
 lists...@terascript.com  with "unsubscribe 
 terascript-talk" in the body.

>>>
>>> To unsubscribe from this list, please send an email to 
>>> lists...@terascript.com  with "unsubscribe 
>>> terascript-talk" in the body.
>>
>> Byteserve Pty Ltd
>> w: http://www.byteserve.com.au/ 
>> e: i...@byteserve.com.au 
>> p: +61 02 9960 6099
>> m: 0409 960 609
>> f: +61 02 9960 6088
>>
>>
>> To unsubscribe from this list, please send an email to 
>> lists...@terascript.com  with "unsubscribe 
>> terascript-talk" in the body.
>
> To unsubscribe from this list, please send an email to 
> lists...@terascript.com  with "unsubscribe 
> terascript-talk" in the body.

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


Re: TeraScript-Talk: Remove non-alphanumeric characters

2018-07-18 Thread Peter Dobbs
Why not implement in JavaScript and bounce any requests that don’t comply?


Peter Dobbs
President | ENGINESS | P: 416.901.6151 | F: 
416.901.6150 | www.enginess.io

[X]

This email and any attachments are confidential and are intended only for the 
person(s) to whom it is addressed. It you are not the addressee named above, 
any use, copying, distribution or disclosure is strictly unauthorized. If you 
have received this information in error, please delete it and any attachments 
and notify me immediately.


On Jul 18, 2018, at 11:24 PM, Wayne Irvine 
mailto:wa...@byteserve.com.au>> wrote:

Cheers. I was viewing this exact StackOverflow article prior to submitting my 
question.

The question is more on implementing the REGEX statement in terascript, than 
the actual REGEx statement.

Wayne

On 19 Jul 2018, at 12:55 pm, Peter Dobbs 
mailto:pe...@enginess.io>> wrote:

https://stackoverflow.com/questions/9364400/remove-not-alphanumeric-characters-from-string-having-trouble-with-the-char


Peter Dobbs
President | ENGINESS | P: 416.901.6151 | F: 
416.901.6150 | www.enginess.io



This email and any attachments are confidential and are intended only for the 
person(s) to whom it is addressed. It you are not the addressee named above, 
any use, copying, distribution or disclosure is strictly unauthorized. If you 
have received this information in error, please delete it and any attachments 
and notify me immediately.


On Jul 18, 2018, at 10:19 PM, Wayne Irvine 
mailto:wa...@byteserve.com.au>> wrote:

I have a situation where users might type in a string and I need to make a 
simple alphanumeric code from it.

Previously I’ve used a bunch of REPLACE statements, but you can never 
underestimate fools. ;)

I’m playing around with REGEX (again) and as usual, it has me stumped. I would 
like to code a simple REGEX (oxymoron) statement that will take a string of 
characters and return either a string with only alphanumerics and spaces, or an 
array of strings with only alphanumerics.

Wayne

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to 
lists...@terascript.com with "unsubscribe 
terascript-talk" in the body.



To unsubscribe from this list, please send an email to 
lists...@terascript.com with "unsubscribe 
terascript-talk" in the body.

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088



To unsubscribe from this list, please send an email to 
lists...@terascript.com with "unsubscribe 
terascript-talk" in the body.




To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


Re: TeraScript-Talk: Remove non-alphanumeric characters

2018-07-18 Thread Wayne Irvine
Cheers. I was viewing this exact StackOverflow article prior to submitting my 
question.

The question is more on implementing the REGEX statement in terascript, than 
the actual REGEx statement.

Wayne

> On 19 Jul 2018, at 12:55 pm, Peter Dobbs  wrote:
>
> https://stackoverflow.com/questions/9364400/remove-not-alphanumeric-characters-from-string-having-trouble-with-the-char
>  
> 
>
>
> Peter Dobbs
> President | ENGINESS | P: 416.901.6151  | F: 
> 416.901.6150  | www.enginess.io 
>
>
>
> This email and any attachments are confidential and are intended only for the 
> person(s) to whom it is addressed. It you are not the addressee named above, 
> any use, copying, distribution or disclosure is strictly unauthorized. If you 
> have received this information in error, please delete it and any attachments 
> and notify me immediately.
>
>
> On Jul 18, 2018, at 10:19 PM, Wayne Irvine  > wrote:
>
>> I have a situation where users might type in a string and I need to make a 
>> simple alphanumeric code from it.
>>
>> Previously I’ve used a bunch of REPLACE statements, but you can never 
>> underestimate fools. ;)
>>
>> I’m playing around with REGEX (again) and as usual, it has me stumped. I 
>> would like to code a simple REGEX (oxymoron) statement that will take a 
>> string of characters and return either a string with only alphanumerics and 
>> spaces, or an array of strings with only alphanumerics.
>>
>> Wayne
>>
>> Byteserve Pty Ltd
>> w: http://www.byteserve.com.au/ 
>> e: i...@byteserve.com.au 
>> p: +61 02 9960 6099
>> m: 0409 960 609
>> f: +61 02 9960 6088
>>
>>
>>
>>
>> 
>>
>> To unsubscribe from this list, please send an email to 
>> lists...@terascript.com  with "unsubscribe 
>> terascript-talk" in the body.
>>
>
> To unsubscribe from this list, please send an email to 
> lists...@terascript.com  with "unsubscribe 
> terascript-talk" in the body.

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


Re: TeraScript-Talk: Remove non-alphanumeric characters

2018-07-18 Thread Peter Dobbs
https://stackoverflow.com/questions/9364400/remove-not-alphanumeric-characters-from-string-having-trouble-with-the-char


Peter Dobbs
President | ENGINESS | P: 416.901.6151 | F: 
416.901.6150 | www.enginess.io

[cid:]

This email and any attachments are confidential and are intended only for the 
person(s) to whom it is addressed. It you are not the addressee named above, 
any use, copying, distribution or disclosure is strictly unauthorized. If you 
have received this information in error, please delete it and any attachments 
and notify me immediately.


On Jul 18, 2018, at 10:19 PM, Wayne Irvine 
mailto:wa...@byteserve.com.au>> wrote:

I have a situation where users might type in a string and I need to make a 
simple alphanumeric code from it.

Previously I’ve used a bunch of REPLACE statements, but you can never 
underestimate fools. ;)

I’m playing around with REGEX (again) and as usual, it has me stumped. I would 
like to code a simple REGEX (oxymoron) statement that will take a string of 
characters and return either a string with only alphanumerics and spaces, or an 
array of strings with only alphanumerics.

Wayne

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to 
lists...@terascript.com with "unsubscribe 
terascript-talk" in the body.





To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.


TeraScript-Talk: Remove non-alphanumeric characters

2018-07-18 Thread Wayne Irvine
I have a situation where users might type in a string and I need to make a 
simple alphanumeric code from it.

Previously I’ve used a bunch of REPLACE statements, but you can never 
underestimate fools. ;)

I’m playing around with REGEX (again) and as usual, it has me stumped. I would 
like to code a simple REGEX (oxymoron) statement that will take a string of 
characters and return either a string with only alphanumerics and spaces, or an 
array of strings with only alphanumerics.

Wayne

Byteserve Pty Ltd
w: http://www.byteserve.com.au/
e: i...@byteserve.com.au
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088






To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.