Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-02-2013, 07:48 PM   #226
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 7,371
Karma: 46288753
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
Quote:
Originally Posted by mzmm View Post

the '.' and '?' are reserved characters, so to get them to match a literal . or ? you have to escape them with a slash (hence \. and \?).
You actually don't have to quote . and ? within a character class; the only special characters there are ] ^ and \ .
PeterT is online now   Reply With Quote
Old 06-02-2013, 07:51 PM   #227
ReaderRabbit
Member
ReaderRabbit began at the beginning.
 
ReaderRabbit's Avatar
 
Posts: 22
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
YES!

Quote:
Originally Posted by PeterT View Post
Try
Code:
([a-z])([\.\?\!])([A-Z])
and
\1\2 \3
* I MIGHT have escaped more than I need too... Probably [.?!] would work instead of [\.\?\!]
That works . . . YEAH!

Thanks so much
ReaderRabbit is offline   Reply With Quote
Old 06-02-2013, 07:58 PM   #228
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 163
Karma: 86115
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
Quote:
Originally Posted by PeterT View Post
You actually don't have to quote . and ? within a character class; the only special characters there are ] ^ and \ .
yeah i was wondering what was going on there.

was actually just on regex.info trying to figure that one out, thanks!
mzmm is offline   Reply With Quote
Old 06-02-2013, 08:06 PM   #229
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 7,371
Karma: 46288753
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
And I was on http://www.regular-expressions.info/charclass.html
PeterT is online now   Reply With Quote
Old 06-03-2013, 02:24 PM   #230
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Can someone give me the regex for the following to be replaced with nothing, there are several lines with the similar text & numbers layout but different to be replaced

#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/

Cheers
JayLaFunk is offline   Reply With Quote
Old 06-03-2013, 03:15 PM   #231
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,260
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by JayLaFunk View Post
Can someone give me the regex for the following to be replaced with nothing, there are several lines with the similar text & numbers layout but different to be replaced

#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/

Cheers
Did you try selecting the (sample) text: click S&R Icon: Then right-click in the search box: <Tokenize> Warning: be very careful using this in the wild. It is very greedy. I usually restrain it by changing some tockens back to Literals I would step by hand and select Replace/Search until I was really sure
theducks is offline   Reply With Quote
Old 06-03-2013, 03:31 PM   #232
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by theducks View Post
Did you try selecting the (sample) text: click S&R Icon: Then right-click in the search box: <Tokenize> Warning: be very careful using this in the wild. It is very greedy. I usually restrain it by changing some tockens back to Literals I would step by hand and select Replace/Search until I was really sure
Sorry theducks, just realized this is a regex thread for sigil, I am actually trying to get a regex for the above in Notepad++

Thanks
JayLaFunk is offline   Reply With Quote
Old 06-03-2013, 03:36 PM   #233
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,260
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Cheat
Paste the sample in Sigil and generate the tokened version
theducks is offline   Reply With Quote
Old 06-03-2013, 03:40 PM   #234
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,260
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Code:
#EXTINF:\d+,.+\s+.+
works NP++ on your sample
theducks is offline   Reply With Quote
Old 06-03-2013, 03:49 PM   #235
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by theducks View Post
Code:
#EXTINF:\d+,.+\s+.+
works NP++ on your sample
That works great but there is some text after the last / that I want to keep

Search
#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/02 Love And Money - Johnny's Not Here.mp3

But keep the last bit
02 Love And Money - Johnny's Not Here.mp3

I thought that there would be some regex that would delete all the text, characters & digits up to the last /

Sorry to all for going off track from sigil
JayLaFunk is offline   Reply With Quote
Old 06-03-2013, 03:53 PM   #236
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 15,260
Karma: 6020309
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
just add a \\ <space> to the end
(escaped \ and a space)
theducks is offline   Reply With Quote
Old 06-03-2013, 04:07 PM   #237
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by theducks View Post
just add a \\ <space> to the end
(escaped \ and a space)
Sorry, not understanding this bit
JayLaFunk is offline   Reply With Quote
Old 06-03-2013, 04:24 PM   #238
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by theducks View Post
just add a \\ <space> to the end
(escaped \ and a space)
Using this
#EXTINF:\d+,.+\s+.+\

leaves me the last [word.mp3]
Example
From
#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/02 Love And Money - Johnny's Not Here.mp3

To
Here.mp3
JayLaFunk is offline   Reply With Quote
Old 06-03-2013, 06:30 PM   #239
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 163
Karma: 86115
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
Quote:
Originally Posted by JayLaFunk View Post
Using this
#EXTINF:\d+,.+\s+.+\

leaves me the last [word.mp3]
Example
From
#EXTINF:274,Johnny's Not Here
/share/Public/04 Music/Love & Money - (2005) Dogs in The Traffic/02 Love And Money - Johnny's Not Here.mp3

To
Here.mp3
replace the trailing space with a /
mzmm is offline   Reply With Quote
Old 06-03-2013, 06:46 PM   #240
JayLaFunk
Connoisseur
JayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enoughJayLaFunk will become famous soon enough
 
JayLaFunk's Avatar
 
Posts: 94
Karma: 538
Join Date: Nov 2009
Device: iPad
Quote:
Originally Posted by mzmm View Post
replace the trailing space with a /
Thanks to theducks & mzmm for your help, that did it

#EXTINF:\d+,.+\s+.+/

Now saved in my regexes

Cheers
JayLaFunk is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Examples of Subgroups emonti8384 Lounge 32 02-26-2011 07:00 PM
Accessories Pen examples Gunnerp245 enTourage Archive 15 02-21-2011 04:23 PM
Stylesheet examples? Skitzman69 Sigil 15 09-24-2010 09:24 PM
Examples kafkaesque1978 iRiver Story 1 07-26-2010 04:49 PM
Looking for examples of typos in eBooks Tonycole General Discussions 1 05-05-2010 05:23 AM


All times are GMT -4. The time now is 02:28 PM.


MobileRead.com is a privately owned, operated and funded community.