Jump to content
Sign in to follow this  
rootx

[SOLVED] Regex expert Help!!

Recommended Posts

rootx
Posted (edited)

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

CD1894EF

In

DC8149FE

Thx

Edited by rootx

Share this post


Link to post
Share on other sites
TheXman
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

Share this post


Link to post
Share on other sites
iamtheky

 

$str = "CD1894EF"

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

 

  • Like 3
  • Haha 1

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

Share this post


Link to post
Share on other sites
TheXman
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:

Share this post


Link to post
Share on other sites
rootx

THX

Share this post


Link to post
Share on other sites
rootx

I have to clean the codes of a column of excell file!!!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×