Page 2 of 2
Posted: Thu May 19, 2011 9:58 pm
by Fool4UAnyway
Are you using the Regular Expression tab, or just performing a Standard (absolute) search?
You may also use the Regular Expression tester to load a single file, or just enter a few lines manually, and play with (parts of) the regular expressions mentioned above to see what Text Crawler does and it does not find.
Posted: Thu May 19, 2011 10:00 pm
by Fool4UAnyway
Just try \d+ in the Regular Expression Tester...
"_ represents a space character" means: I entered an underscore character here to make the character( position)s clear. Some forums do remove leading white spaces. But when using such an expression, you will simply have to press the space bar once for each _.
Posted: Thu May 19, 2011 10:04 pm
by Fool4UAnyway
You could also use this regular expression that shouldn't suffer from any white space shredding of forums:
[ ][\d\.]+[ ]'UNDEF'
[ ] = the set ([]) of only a space character, so just a single space character
\d = the set of digits 0 through 9 = [0-9]
[\d\.] = any digit 0 through 9 or a dot
Posted: Wed May 25, 2011 7:52 pm
by Helen
I started a search for image files and asked for png & gif images to be excluded, but it included them...any idea what went wrong? Would appreciate any help.
Posted: Wed May 25, 2011 8:25 pm
by DV2
Did you separate the names by semicolons?
eg
*.png;*.gif
I assume you are referring to Duplicate Cleaner, is textcrawler doesn't do too well with image files...
Re: example using a wildcard to find/replace a text sequence
Posted: Sun Jun 02, 2013 9:00 am
by Kristen
Hi,
Thanks for the posts on the topic which helped me find a solution. I wanted to do something similar using wildcards.
I have multiple files in which I'd like to add a few extra lines of code, by searching text using a wildcard.
Say my text looks like this:
output_filename <- "IBRAe10_5Maamphibians0025_training_GDM.csv"
The "wildcard" search I used is this:
output_filename <- "IBRAe10_([^,]*)_GDM.csv"
and so my replace code looks like this:
output_filename <- "IBRAe10_$1_GDM.csv"
output_filename2 <- "IBRAe10_$1_GDM_wt2.csv"
output_filename3 <- "IBRAe10_$1_GDM_nowt.csv"
Which writes as:
output_filename <- "IBRAe10_5Maamphibians0025_training_GDM.csv"
output_filename2 <- "IBRAe10_5Maamphibians0025_training_GDM_wt2.csv"
output_filename3 <- "IBRAe10_5Maamphibians0025_training_GDM_nowt.csv"
May not have much finesse, but it worked...