How do you add a numerical value to a regex

Ads
 

How do you add a numerical value to a regex

how do you add a numerical value in a regex. I want to replace my pics ex: bob.jpg susan.jpg mike.jpg with 1.jpg 2.jpg 3.jpg etc. Thanks

View Answers

June 6, 2013 at 5:45 PM

hi friend,

Split the file name using the following regex

String regex = "\\.";

and then replace the file name with the numbers as you required.

Thanks.

Ads









Related Tutorials/Questions & Answers:
How do you add a numerical value to a regex
How do you add a numerical value to a regex  how do you add a numerical value in a regex. I want to replace my pics ex: bob.jpg susan.jpg mike.jpg with 1.jpg 2.jpg 3.jpg etc. Thanks
How to add key value pair in Java
How to add key value pair in Java  Hi, I have to store the key and value pair in Java. How to store key value pair in Java? Thanks   Hi, You can use the put method of Hashtable. Check the tutorial Creating a Hash
Advertisements
How to add value from sql server in dropdownlist
How to add value from sql server in dropdownlist  I have created a hospital management project using jsp servlet, where one form name is patient registration, in that form i have taken id, name, and i want to retrieve a patient
How would you read in and add all this into a list?
How would you read in and add all this into a list?   FYI this is all stacked. 0 " " " " " " " " " " 1 "48" "111" "Dallam" "06" "County" 2 "48" "421" "Sherman" "06" "County" 3 "48" "295" "Lipscomb" "06
How do you map Java Objects with Database tables?
How do you map Java Objects with Database tables?  Hi, How do you map Java Objects with Database tables? thanks
How can you add elements of two arrayLists in java?
How can you add elements of two arrayLists in java?  if you have... of tempArray2 = [a, b, c, d, e] and you want it to result in newArr = [hi a, my b, name c, is d, john e] how do you go about
you pass a variable by value.
you pass a variable by value.  How do you pass a variable by value... $a = &$b /*--------------Pass By value----------------*/ function add($a) { return ++$a; } add($a); /*---------------Pass by reference
How to add radio button value in a table for particular field?
How to add radio button value in a table for particular field?  Hi,I... one radio button for text field then it insert only one value absent OR present...() { if(doucment.getElementById(elementId)) document.getElementById("pre").value
in an application one task has to done for every 15 minutes ? How con you do it?
in an application one task has to done for every 15 minutes ? How con you do it?  in an application one task has to done for every 15 minutes ? How con you do
how to do this?
how to do this?   Given any integer 2D array, design then implement a Java program that will add to each element in the array the corresponding column number and the corresponding row number. Then, it prints the array before
How to add
How to add   Hi, I want to make a website which will recommend users books according to the genre selected by them. I am using PHP, JavaScript and mySQL. The problem is that there will me almost more than 100 books
What do you understand by JPA?
What do you understand by JPA?  What is JPA and how it can be integrated? Thanks   Hi, Check at JPA 2.1 Tutorial. Thanks
RegEx
RegEx  I want to know the javascript RegEx code for validation of ( ) parenthesis.. The code is validating the parenthesis but after submit the parenthesis is disappear. what should i do
ModuleNotFoundError: No module named 'django-add-default-value'
: No module named 'django-add-default-value' How to remove the ModuleNotFoundError: No module named 'django-add-default-value' error? Thanks  ...ModuleNotFoundError: No module named 'django-add-default-value'  Hi
How to delete line starting with a letter in java Regex?
How to delete line starting with a letter in java Regex?  Hi, i 'm trying to code with regex and java. i want to know how it's possible to delete lines which starts with a letter like G or g in a text. i tried
How to do url rewritting?
How to do url rewritting?  Dear Sir/Mam I have this link http://localhost:8085/call4admission/admin/home/Admin... to do?Please suggest
SQL add column default value
SQL add column default value       Add a Column default value is used in SQL, When create... with Example The Tutorial understand you a example from SQL add column default
how to archive cllocation value
to archive cllocation i.e how do i encode and decode it... please help. regards...how to archive cllocation value  hi, Am working with location based application, need to store cllocation value in array, for that i need to arhive
how to archive cllocation value
to archive cllocation i.e how do i encode and decode it... please help. regards...how to archive cllocation value  hi, Am working with location based application, need to store cllocation value in array, for that i need to arhive
What do you understand by private, protected and public?
What do you understand by private, protected and public?   Hi, What do you understand by private, protected and public? thanks
how to do gui
how to do gui  import java.util.Scanner; import javax.swing.JFrame; import javax.swing.JOptionPane; public class ShippingCost { public static void... is RM" + num1); } } } how to do gui for this coding..tq   import
how do i solve this problem?
how do i solve this problem?  Define a class named Circle.... A private static constant named PI with a fixed value of 3.142 that represents the value of pi. A default constructor. A constructor that creates Circle objects
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to get radio value
how to get radio value    how to retrive the option value and insert the next table pls give example
How do i do the coding for 'leaving a comment' in java
How do i do the coding for 'leaving a comment' in java  i am designing a webpage.In my webpage i want to add the option of adding a comment by the readers of the page.how do i do
How do I upgrade mysql?
How do I upgrade mysql?  How do I upgrade mysql
What do you understand by Domain Parking?
What do you understand by Domain Parking?  What is the domain parking concept in the web hosting? How to part a domain? What is Domain Parking...; Suppose you have bought a domain and you still have taken the space

Ads