Working on a javascript project using titanium studio (forked from aptana).
we have a utility class jutils, and in all our code i have this:
Code
var j = require('jutils');
bunch of utility functions
j.parseInt(...);
if (j.isnull(..))...
etc
Coworker wants to rename it from j to JUtils. the IDE doesn't offer a good way to do that. is there a good way to do that via regex?
so change things like this:
j.parseInt(..) => JUtils.parseInt(..)
if (j.isnull(..)) => if (JUtils.isnull(..))
thisObj.doSomething() => no change
i can use the regex [^a-zA-Z]j. to find it. the problem is if i do a replace on it, it will replace the character immediately to the left of j, eg:
if (j.isnull(..)) => if JUtils.isnull(..))
so i need the find/replace to recognize that it's not immediately following a letter, but it has to keep whatever character is there.
any suggestions? i can write a quick java app to do it or run a bunch of different find/replace for (j [j <space>j <tab>j *j +j -j etc etc, but i'm curious if it can be done via a single find/replace