Hello all,
I have the text = {skjfhaf akdjfj}....rdrgjfgj
how to find the position of the curly braces {
Thanks
How to find position of curly braces {
Moderators: Dorian (MJT support), JRL
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: How to find position of curly braces {
Use the position command.
Re: How to find position of curly braces {
I used it but it did not know the {
pos>{,text,1,res,1 does not work
pos>{,text,1,res,1 does not work
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: How to find position of curly braces {
It's working for me in v 15.0.18.
left returns 1, right returns 16
However, if I keep the spaces as per your example, both are 0
Unless i ignore spaces :
left returns 1, right returns 16
Code: Select all
Let>text={skjfhaf akdjfj}....rdrgjfgj
pos>{,text,1,left
pos>},text,1,right
Code: Select all
Let>text = {skjfhaf akdjfj}....rdrgjfgj
pos>{,text,1,left
pos>},text,1,right
Code: Select all
let>ignorespaces=1
Let>text = {skjfhaf akdjfj}....rdrgjfgj
pos>{,text,1,left
pos>},text,1,right
Yes, we have a Custom Scripting Service. Message me or go here
Re: How to find position of curly braces {
Yes, right. The problem is spaces.
And I got another problem:
If I have a text like this: {30 - 25}
How can I use position command to find the curly brace?
That text will return a number 5 if I do let>text={30 - 25}
Thanks
And I got another problem:
If I have a text like this: {30 - 25}
How can I use position command to find the curly brace?
That text will return a number 5 if I do let>text={30 - 25}
Thanks
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: How to find position of curly braces {
Code: Select all
let>text={"{30 - 25}"}
pos>{,text,1,left
pos>},text,1,right
Code: Select all
let>mystring={"{30 - 25}"}
let>BEGINNING={
let>END=}
RegEx>(?<=%BEGINNING%).*?(?=%END%),mystring,0,matches,nm,0
mdl>%nm% matches %CRLF%%matches_1%
Yes, we have a Custom Scripting Service. Message me or go here
Re: How to find position of curly braces {
Thanks Dorian!