Jump to content
Macro Express Forums

Find text Especific


Recommended Posts

Hello, my friends, this is my first post in this great community, so if you are in the wrong place, I apologize. I need your help, For example, I have a variable that contains the text "user with code BQ", I need the code "BQ", however it can appear anywhere in the text. What I've been trying to find is the code to isolate the code "BQ" but i fail, that's it ... does anyone have any ideas? XD

My macro is version 4.7.1.1.

Link to comment
Share on other sites

Variable Set Integer %N1% from Position of Text in Variable %T1% (search for "user with code ") 

That gives you the displacement within the variable of the text "user with code ".  Add 15 to the value in N1, and you have the starting position within the text of the two-character code.  Extract the characters into another variable with

Variable Modify String: Copy Part of %T1% to %T2% (starting position N1, characters to copy 2)

If I have misunderstood what you want, then give us some examples of text you are working with, and the codes you are trying to isolate. 

  • Like 1
Link to comment
Share on other sites

On 30/06/2017 at 5:04 PM, rberq said:

Variable Set Integer %N1% from Position of Text in Variable %T1% (search for "user with code ") 

That gives you the displacement within the variable of the text "user with code ".  Add 15 to the value in N1, and you have the starting position within the text of the two-character code.  Extract the characters into another variable with

Variable Modify String: Copy Part of %T1% to %T2% (starting position N1, characters to copy 2)

If I have misunderstood what you want, then give us some examples of text you are working with, and the codes you are trying to isolate. 

Thank's very much to all of you!!! rberq, Perfect you resolved my problem !!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...