Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime text 2 Search and replace with random number

is it possible to search and replace a text string with a random number e.g.

Search: "This is the number 23 and i like it"

replace: "this is the number " . Rand(0,100) . " and i like it"

is that possible?

like image 844
AndrewMcLagan Avatar asked Aug 23 '13 09:08

AndrewMcLagan


People also ask

How do I find and replace in Sublime Text?

Or, if you want to find and replace text in a number of files at once, press Command + Shift + F or Control + Shift + H to open Sublime Text's Find in Files tool that can search and replace across as many files as you have open or select from its menu.

How do I find and replace in Sublime Text in Windows?

To use Find and Replace in Sublime Text 3, you can either click “Find” in the top-bar, then select “Replace” from the list, or you can press the keyboard shortcut Ctrl+H – the same way it works in, for example, Microsoft Office Word.

How do I search multiple files in Sublime Text?

Use the Search all shortcut: Ctrl + Shift + F , then select the folder in the "Where:" box below. (And for Mac, it's ⌘ + Shift + F ). If the root directory for the project is proj, with subdirectories src and aux and you want to search in all subfolders, use the proj folder.


1 Answers

Not out of the box, but if you are familiar with Python, you could easily create a plugin to do so.

like image 102
wesbos Avatar answered Oct 21 '22 11:10

wesbos