Jump to content

Recommended Posts

Posted (edited)

Inside a loop I need to change the the order or my strings!!

CD1894EF

In

DC8149FE

Thx

Edited by rootx
Posted (edited)

@rootx

Do you have a question?  Or did you just want to let us know where you are in your coding endeavors?

What makes you think that a regular expression would be the best solution?

 

Edited by TheXman
Posted

 

$str = "CD1894EF"

 msgbox(0, '' , stringregexpreplace($str , "(.)(.)" , "$2$1")) ;DC8149FE

 

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Posted
26 minutes ago, rootx said:

Inside a loop I need to change the the order or my strings!!

CD1894EF

In

DC8149FE

@rootx

Just out of curiosity, what are you trying to accomplish?  At first, it appeared you were trying to change the endianess of an integer but didn't understand endianess.  But swapping the nibbles within a byte has nothing to do with endianess.  I can't figure out a practical reason to do this.  :huh2:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...