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.
Remplace text in middle on line
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 _.
"_ 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 _.
Re: example using a wildcard to find/replace a text sequence
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...
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...