I am currently working on a project that dynamically displays DB content into table.
To edit the table contents i am want to use the dynamically created “string”+id value.
Is there any way to retrieve the appended int value from the whole string in javaScript?
Any suggestions would be appreciative…
Thanks!!!
If you know that the string part is only going to consist of letters or non-numeric characters, you could use a regular expression:
If it can consist of numbers as well, then things get complicated unless you can ensure that
stringalways ends with a non-numeric character. In which case, you can do something like this: