regex - How do I mutate a tritium variable string? -


i've fetched entire list of classes body variable so:

$page_code = fetch("self::body/@class") 

but want grab 1 class out. tried using replace() , regex on variable contents think something's syntax:

$page_code {   text() {     replace(/[^a-z]*/, '')   }   log("@@@@@@@@@@@@@@ page code " + $page_code) } 

i think code want is:

$page_code {   replace(/[^a-z]*/, '') } log("@@@@@@@@@@@@@@ page code " + $page_code) 

since $page_code string, don't need open text() scope. also, log() statement should outside, or else log current value of $page_scope.

see here: http://tester.tritium.io/8ccb7ef99a0fd2fcbd60bd74cc137b040f57555e


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -