homepage Welcome to WebmasterWorld Guest from 107.20.131.154
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

    
Regular Expressions & Math Operations
omid_79




msg:3232066
 10:13 pm on Jan 25, 2007 (gmt 0)

Is there a way to perform math operation using regular expressions?
I use HomeSite, and using Extended replace with Regular Expressions, I am able to locate/replace a code, but can not find how to perform math operations on the found code.

Okay, let me explain this better. What i'm trying to do is using Extended replace find prices on my pages and do some math operations with them. So far using extended replace i can find the prices, but how do i perform math operations on them. is this possible?

I use the following RegEx to locate the code:
Price ([$][0-9.]*)
but can not do this for example
/1 * 2 , i want to simply take the value stored in the first variable and multiply it by 2.

Any help would be greatly appreciated.

 

sgietz




msg:3250622
 11:15 pm on Feb 12, 2007 (gmt 0)

You can't do that with RegEx. You need some other programming language to manipulate the match(es), such as Javascript, VB or PHP.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved