last day (14 days later) » 

4:54 PM
0
Q: How I can skip the space if the space came between tow charater in javascripts?

kernalI have the text: first.getage() person.getinfo( tow.fff(one) , data ) car.getcompany fff I want to get the output : first.getage()/person.getinfo( tow.fff(one) , data )/car.getcompany/fff my problem when I split by the space I get the output : first.getage(/)/person.getinfo(/tow.fff(one)/...

 
What are you using? regex? split?
@tymeJV I think the ** is OPs failed format.
 
@zer00ne I edit the question
@zer00ne I use split by space but not work in my case because I must to skip the space if came between arcs
 
@kernal The space at the beginning you don't want, just those 2 between?
 
@zer00ne yes I want only the space between the arcs
 
@kernal regex is the only way I think, and I have a solution but the spaces in front of the string is it unavoidable?
 
4:58 PM
hi
 
This'll work but the space in front of string messes it up \s\b(?=\w*(?=\.get))
 
can I get your solution ?
 
Sure but it'll put a / in front of that string because it has a space
 
assume I saved the text in var str
how I can use your reg ?
 
With the replace method but syntax is tricky
If you trim the str this will work
 
5:03 PM
can you write the syntax plz . I did not use reg before
 
But it's context is different than yours. It targets .get
not parenthesis, targeting arcs or parenthesis is too problematic because of multiple nesting
Ok, I'll post
 
ok
take your time
assume the text save in vas str
can you write the syntax plz . I did not use reg before
 

last day (14 days later) »