Home Download Buy Blog Forum Support

Chained (Piped?) Snippet REGEX substitutions?

Chained (Piped?) Snippet REGEX substitutions?

Postby jbn on Mon Mar 12, 2012 3:06 pm

Is it possible to chain REGEX substitutions in a snippet?

It's a feature I want in general, but specifically, I am trying to get my snippet to auto-generate the package in a Scala file that uses SBT. Currently, I have:

Code: Select all
package ${TM_FILEPATH/.+src\/main\/scala\/(.+)\/.+\.scala$/$1//\//\./g}


The missing part is the translation of slashes to dots. I tried a nesting, but that seems to only work for placeholders.

Thanks for your time.
jbn
 
Posts: 1
Joined: Mon Mar 12, 2012 2:58 pm

Re: Chained (Piped?) Snippet REGEX substitutions?

Postby mpedrummer on Mon Mar 12, 2012 6:02 pm

Sorry to just "me too" on this, but I'm curious about the same thing.
mpedrummer
 
Posts: 23
Joined: Thu Mar 08, 2012 9:50 pm

Re: Chained (Piped?) Snippet REGEX substitutions?

Postby nick. on Mon Mar 12, 2012 6:15 pm

I'm not certain what your trying to match/replace, but have a look in this thread as it may be related.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: Chained (Piped?) Snippet REGEX substitutions?

Postby ericclemmons on Tue Jul 24, 2012 6:16 am

Has anyone found a solution for this? This is driving me crazy!
ericclemmons
 
Posts: 2
Joined: Tue Jul 24, 2012 6:15 am


Return to Plugin Development

Who is online

Users browsing this forum: Exabot [Bot], FichteFoll and 7 guests